Javascript breakpoints not working in Chrome Developer Tools

大憨熊 提交于 2019-12-12 18:45:52

问题


Using firebug for Firefox, I can set a breakpoint in my JS code, refresh the page and the code will automatically pause at my breakpoint (my code runs on page load).

When I do the same in Chrome Developer Tools (Ctrl + Shift + J), it does not stop at the breakpoints. How do I get the code to stop at the breakpoints?

Also, my console.logs appear in firebug for Firefox, but not in the Chrome console. How do I get the Chrome console to display my console logs?


回答1:


Breakpoints work for me; Press Ctrl-shift-i, click the Scripts tab, select the script that you want, then click on the line number where you would like to set the breakpoint. Breakpoints may be disabled; make sure that the button on the right side of the Scripts tab (next to step over, step out, and step in buttons), shows a line through it.

If this isn't working for you, try restarting the browser, disabling extensions, creating a test HTML page,, etc.



来源:https://stackoverflow.com/questions/9797911/javascript-breakpoints-not-working-in-chrome-developer-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!