← Back

no-debugger warning

Disallows debugger statements

Examples

❌  Incorrect

function isTruthy(x) {
    debugger;
    return Boolean(x);
}

✅  Correct

function isTruthy(x) {
    return Boolean(x); // set a breakpoint at this line
}