DEV Community

Discussion on: What's Your Coding Quirk?

Collapse
 
mistval profile image
Randall

Speaking of debuggers, I like typing debugger; statements into JS/TS code while debugging. They cause the debugger to break much more reliably (sometimes an issue with TS), are easy to find, and they move with the code as I make changes. I can't remember ever seeing anyone else type enter a debugger; statement into their code.

Collapse
 
sjmulder profile image
Sijmen J. Mulder

Oh yes that's very useful! I do it sometimes. Usually it's easier to just click the line in the debugger but with JavaScript it can be a chore to find it in the inspector. Then adding a 'debugger;' line can be helpful.