Keyboard Shortcut to pause javascript execution

41,120 views
Skip to first unread message

OneMHz

unread,
Feb 1, 2012, 4:53:26 PM2/1/12
to Google Chrome Developer Tools
I often find it would be useful if I could toggle the 'pause on next
execution' with the keyboard. For example, if I'm trying to find a
stray event from clicking on an item in a pop-up menu or dropdown.
Moving focus away from the menu, or even page element will often close
it, and then I end up pausing the code that re-opens it, or even
mouseovers on the page that are impossible to avoid.

Mikhail Naganov

unread,
Feb 1, 2012, 5:09:18 PM2/1/12
to OneMHz, Google Chrome Developer Tools
Hi OneMHz,

DevTools has keyboard shortcuts -- you can view a help screen by
pressing the '?' button. However, they only work when the DevTools
window has focus. For your issue, please consider using 'Event
Listener Breakpoints' on the right of the 'Scripts' panel.

John J Barton

unread,
Feb 1, 2012, 5:28:25 PM2/1/12
to OneMHz, Google Chrome Developer Tools

Perhaps there is (or can be) a binding, but just to note: you can use
the Event Listener Breakpoints to break on 'click' only.

jjb

Alexander Pavlov

unread,
Feb 2, 2012, 1:28:17 AM2/2/12
to OneMHz, Google Chrome Developer Tools
You are probably looking for the "F8" (Pause Script Execution) shortcut while on the Scripts panel. It will break on the next JavaScript  statement executed.

--
-alexander

PhistucK

unread,
Feb 2, 2012, 3:00:33 AM2/2/12
to OneMHz, Google Chrome Developer Tools
How about adding an event handler for keyup/keydown/keypress for the keyboard shortcut you need and putting the "debugger;" statement within it?
It will pause the execution (as long as the Developer Tools window is open).

PhistucK

Edison Quisiguina

unread,
Sep 29, 2015, 2:13:47 AM9/29/15
to Google Chrome Developer Tools, one...@gmail.com
Key 'F8' works for me, thanks OneMHz :)
Reply all
Reply to author
Forward
0 new messages