no-debugger
JavaScript / TypeScriptPythonsuspiciousno fixdefault: warnjs/eslint-recommendedjs/biome-recommendedjs/oxlintpython/ruff
What it does
Section titled “What it does”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.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”debugger;...Configuration
Section titled “Configuration”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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint | no-debugger |
full |
| ruff | T100 |
full |