Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ function isEven(x){
console.log(`${x} is odd`)
}

debugger;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected 'debugger' statement


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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`debugger;` can pause runtime and disrupt requests


A top-level debugger; can halt execution during initialization in environments with an attached inspector. That interruption can block startup paths and create avoidable reliability incidents.

Remove this debugger; before merge, or guard debugging behind an environment check not enabled in production


function isNumber(num){
let x = undefined
x= num % 2
debugger;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected 'debugger' statement


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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`debugger;` introduces execution breakpoints in normal flow


This debugger; sits on an active execution path and can stop each invocation under debugging-enabled runtimes. Repeated pauses can degrade throughput and cause hard-to-reproduce operational failures.

Remove this line, and use temporary logging or conditional debug hooks that are disabled in production

if(false) {
console.log("Number is false")
} else if (!!x) {
Expand Down