1 points · by jakub_g · 10y ago · 1 comment
Say you have a 100 line file, you put breakpoint in L80 in Chrome devtools. Then you add a line at the beginning, and L80 becomes L81. The breakpoint I just put a minute ago can fall on an empty line and never execute.
I know about `debugger` which is quite handy sometimes, but it's not very feasible to pollute whole codebase with it during debugging session.
Any other options?
"slipping" can happen if:
- The dev tools can't determine where to move the breakpoint (i.e.: if you significantly changed the file). Just re-assign the breakpoint.
- It can also happen when you use a badly-constructed source map. Disable source maps and work with raw code, and contact the tool-maker about this.
- Sometimes, the dev tools will just go crazy. Just close and reopen.
- debugger. You have no choice.