Hacker News new | ask | show | jobs
by lollipop25 3710 days ago
This depends on the browser. Dev tools are "smart". It knows where you should put a breakpoint (i.e: putting it on a blank line, it puts it on the next executable line instead). It also knows when you adjusted your script (i.e.: removing a line above, it moves up the breakpoint).

"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.