When you set a breakpoint on a line that does not contain executable code, the debugger tries to be useful and shifts the breakpoint to the next closest line that it can find with executable code on it. It is not as simple as it seems, because it can set breakpoints on scripts that have already been collected in garbage, so the debugger cannot always determine whether a line contains non-executable code or just the corresponding script garbage collection.
The problem is even more complicated when using source maps, since the debugger needs to figure out which lines in the source source match the line in the generated source on which you set the breakpoint. The way we do this at present is not always accurate, which can lead to problems like the one you see.
However, there are other things that could explain why your breakpoints do not work as they should. For example, we also need to map breakpoints to byte offsets, which is also not always true.
We are actively reorganizing the breakpoint code in the debugger at the moment in an attempt to solve these problems, so I wonβt be surprised if you click regression. It would be best to write a bugzilla bug for this problem, ideally with steps to reproduce.
Hope this helps!
source share