Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Javascript Debugger, when paused, won't reload page

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".

like image 964
DragonFax Avatar asked Jun 14 '12 04:06

DragonFax


People also ask

How do I bypass paused debugger in Chrome?

It seems counterintuitive, but there are a couple of reasons this is really useful for those debugging sessions. TL;DR Right click in the area where you'd normally set breakpoints, select “never pause here” and you can prevent the debugger from stopping on exceptions or debugger statements.

How do I resolve paused debugger?

One possible cause, it that you've enabled the "pause on exceptions" (the little stop-sign shaped icon with the pause (||) symbol with in in the lower left of the window). Try clicking that back to the off/grey state (not red nor blue states) and reload the page.

How do I rerun JavaScript in chrome?

Different operating systems and browsers use different commands or shortcuts. For Windows in Chrome or Edge, the keyboard shortcut Ctrl + F5 (or Ctrl + Reload) refreshes. For Mac, hold Cmd-Shift-R or Shift-Reload. Most browsers also have a refresh button next to the URL.


1 Answers

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

like image 176
McGarnagle Avatar answered Sep 28 '22 12:09

McGarnagle