JavaScript logoJavaScript/
JS-0005

Debugger activation detectedJS-0005

Critical severityCritical
Bug Risk categoryBug Risk

The debugger statement is used to tell the JavaScript environment to stop execution and start up a debugger at the current point in the code.

Production code should not contain debugger statements, as they will cause the browser to stop executing code and open the console debugger.

Bad Practice

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