Execution pauses at a debugger keyword left in the code

tx0/ts:leftover-debuggerrecommendedwarningsmell

What it finds

debugger; stops the program in a debugger whenever one is attached, which is meant while debugging and not in code that is kept.

The fix removes the statement where it stands in a list of statements, which changes nothing else the code does, and is safe.

From the rule's source, leftover_debugger.rs.

Example from the rule's tests
function load(id: string) {  debugger;tx0 reports: remove this debugger statement  if (id === "") debugger;tx0 reports: remove this debugger statement  return id;}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/ts:leftover-debugger" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/ts:leftover-debugger] reason="..."

tx0 explain tx0/ts:leftover-debugger shows the same in the terminal. Found a false positive? Report it.