最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

debugging - Chrome Javascript Debugger, when paused, won't reload page - Stack Overflow

programmeradmin0浏览0评论

Sometimes when I'm debugging some javascript in Chrome and I have the javascript paused, if I try to reload the page, chrome instead just "continues" the debugger, stepping to next breakpoint.

There doesn't seem to be any way to force the javascript to stop running completely, and let chrome just reload the page. Every press of -R or click of the reload button simply continues to the next breakpoint.

My make-shift solution right now is to

  1. copy the url bar address
  2. close that tab
  3. open a new tab
  4. and then open the url in the new tab.

This is rather brute-force but its the only way I get Chrome to actually load a fresh copy of that page, instead of just continuing the existing running one. Emptying the cache has no affect because its not even trying to reload the page.

p.s. I also notice there is no "stop" button for the javascript debugger as well. How do I just tell chrome to stop executing the javascript, no need to continue. The only controls are "continue", "step-over", "step-in", "step-out". How is there no "stop" or "cancel".

Sometimes when I'm debugging some javascript in Chrome and I have the javascript paused, if I try to reload the page, chrome instead just "continues" the debugger, stepping to next breakpoint.

There doesn't seem to be any way to force the javascript to stop running completely, and let chrome just reload the page. Every press of -R or click of the reload button simply continues to the next breakpoint.

My make-shift solution right now is to

  1. copy the url bar address
  2. close that tab
  3. open a new tab
  4. and then open the url in the new tab.

This is rather brute-force but its the only way I get Chrome to actually load a fresh copy of that page, instead of just continuing the existing running one. Emptying the cache has no affect because its not even trying to reload the page.

p.s. I also notice there is no "stop" button for the javascript debugger as well. How do I just tell chrome to stop executing the javascript, no need to continue. The only controls are "continue", "step-over", "step-in", "step-out". How is there no "stop" or "cancel".

Share Improve this question asked Jun 14, 2012 at 4:13 DragonFaxDragonFax 4,8053 gold badges34 silver badges35 bronze badges
Add a comment  | 

5 Answers 5

Reset to default 9

When I want to do this I close the debugger (letting the scripts finish running), then re-open it and hit refresh.

I found the issue that was causing this for me was that I had accidentally hit a button in the bottom left to "pause on JavaScript exceptions". It was blue - I clicked on it twice to bring it back to grey, and the debugger stopped pausing altogether.

you could just deactivate all the breakpoints, reload the page, and reactivate them, its the last button (the fifth one starting from pause)

Google Chromes debugger is amazing, but it isn't like gdb where you can just start it or kill it, though you can enable/disable it by calling up the dev tools, think of it more like a monitor or manager for the interpreter, since JS for the most part is always running or running when JS needs to be parsed, the debugger simply interacts with the interpreter, thats how I've interpreted, if Im wrong I apologize.

If you want to actually stop all activity in the tab without actually closing it or the developer tools window, you can force it into the "Aw, snap!" state (with a handy reload button) via Chrome's Task Manager (More Tools -> Task Manager, select the tab, hit "End Process").

This way you can reload the tab immediately without waiting for all the scripts to finish. And the developer tools window will automatically reconnect when you hit refresh.

Google chrome debugger doesn't turn off, EVER. Once I created 1 breakpoint, but now there is no breakpoints but its still pauses and there is no breakpoint where it paused. I highly recommend not using the debugger at all, if you did, just uninstall chrome and reinstall and never set any breakpoints.

发布评论

评论列表(0)

  1. 暂无评论