Google Chrome debugger skip breakpoint

后端 未结 2 1660
小蘑菇
小蘑菇 2021-02-20 07:08

I am currently trying to debug a js script in chrome, I put a breakpoint in the script and it breaks properly when I use only one tab, but on a second tab it doesn\'t break even

2条回答
  •  甜味超标
    2021-02-20 07:30

    Did you use the pretty print option when viewing the source:

    I have noticed that the formatted copy can get out of sync. I remove all of the breakpoints, close both the formatted tab and the original tab (in sources), then open the original, click the pretty print option, and add back my break points.

    I haven't looked in depth as to why this is happening, it's just what I've experienced and the work around I found (assuming it's something with the cached version of the formatted source).

提交回复
热议问题