Skip to content

no-debugger

Reports a statement or a call that stops the program in a debugger: a debugger; statement, a call of one of the calls of the language (Python breakpoint(), pdb.set_trace()), or an import matching the option imports. A language lists its calls in its grammar’s rule row.

A debugger call left in the code stops the program for whoever runs it, and in production it hangs a request or a process. It is always a leftover.

To fix, delete the statement.

Reported
debugger;
...
js:
lint:
rules:
no-debugger:
level: warn # off, warn (default), error
options:
calls: []
imports: "\\b\\B"
python:
lint:
rules:
no-debugger:
level: warn # off, warn (default), error
options:
calls: []
imports: "\\b\\B"
Option Type Default Description
calls list [] Calls that start a debugger
imports string "\\b\\B" An import of a debugger module

Enabled by the presets: js/eslint-recommended, js/biome-recommended, js/oxlint, python/ruff.

Suppress one line with sudsy-disable-next-line no-debugger in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
eslint no-debugger full
ruff T100 full