Skip to content

eslint/no-debugger Correctness

This rule is turned on by default.
🛠️ An auto-fix is available for this rule.

What it does

Checks for usage of the debugger statement

Why is this bad?

debugger statements do not affect functionality when a debugger isn't attached. They're most commonly an accidental debugging leftover.

Example

javascript
async function main() {
  const data = await getData();
  const result = complexCalculation(data);
  debugger;
}

References

Released under the MIT License.