Skip to content

noDebugger (JavaScript)

Language JavaScript (and super languages)
biome.json
{
"linter": {
"rules": {
"suspicious": {
"noDebugger": "error"
}
}
}
}

Disallow the use of debugger

debugger;
code-block.js:1:1 lint/suspicious/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ This is an unexpected use of the debugger statement.

> 1 │ debugger;
│ ^^^^^^^^^
2 │

ℹ A debugger statement pauses the program when a debugger is open. It is meant for debugging only, and it should not be left in code that is shipped.

ℹ Unsafe fix: Remove debugger statement

1 │ debugger;
│ ---------
const test = { debugger: 1 };
test.debugger;