Chrome DevTools won't let me set breakpoints on certain lines

前端 未结 6 1900
臣服心动
臣服心动 2021-02-06 20:37

In the image above, I tried setting breakpoints on every line from line 437 to line 443. However, I cannot set breakpoints on lines 439 and 440. When the function runs,

相关标签:
6条回答
  • 2021-02-06 20:55

    I have same problem in chrome dev tool source panel snippets when I write some codes to test my idea.

    Only way for me worked is close dev tool panel and refresh page then reopen

    This problem happened after I modified codes in debug mode

    0 讨论(0)
  • 2021-02-06 20:56

    I think that my classmate and I had this issue as well today. We made our changes and then hit Ctrl + S (or Cmd + S) to save the changes in the debugger and then we were able to add the breakpoints.

    0 讨论(0)
  • 2021-02-06 20:58

    This was frustrating for me today but I found the problem. I was trying to place a breakpoint inside an orphan function (nothing was calling it). As soon as I fixed it, all was well. Smart - but wish there was even a tiny hint that this was the case.

    0 讨论(0)
  • 2021-02-06 21:01

    If you are using js minification and sourcemaps, ensure that they are up to date with your source code.

    0 讨论(0)
  • 2021-02-06 21:08

    This recently became an issue for me, running System.js and Babel, and with plain ES6 transpiling, I haven't gotten to minifying/mapping yet. A workaround seems to be to add your breakpoint to the !transpiled file, a matching breakpoint will automagically appear in the corresponding line in the raw file.

    0 讨论(0)
  • 2021-02-06 21:10

    In my case, I could not put a break point on the calling function line, but it worked into the function... weird but at least it works.

    0 讨论(0)
提交回复
热议问题