# no-debugger

Disallow the use of debugger statements.

debugger statements are used to tell the environment executing the code to start an appropriate debugger. These statements are rendered useless by modern IDEs which have built in breakpoint support. Having them in production code is erroneous as it will tell the browser to stop running and open a debugger.

# Invalid Code Examples

function doSomething() {
    debugger;
    doSomethingElse();
}
More incorrect examples
debugger
debugger;

Source (opens new window)

Last Updated: 11/18/2020, 9:36:33 PM