Execution pauses at a debugger keyword left in the code
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.
function load(id: string) { debugger;tx0 reports: remove this debugger statement if (id === "") debugger;tx0 reports: remove this debugger statement return id;} 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:
[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.