How to receive a chrome.debugger pause event before DevTools pauses the extension?

156 views
Skip to first unread message

mare verde

unread,
Feb 13, 2023, 4:12:54 AM2/13/23
to chrome-debugging-protocol
I made a small google chrome extension, named "dbg"  to demonstrate my question.
A dbg.zip file (42K) with the extension can be downloaded from my website: here.
The sw.js of the extension creates a "debuggee" and a "debugger" window.
The debugger obtains the script source from the debuggee and sets a breakpoint on a statement.
If the DevTools console was opened first, then the breakpoint works as expected.
The debugger receives a "paused" and a "resumed" event message after the DevTools resume button (or F8) is clicked.
To be usefull, the "paused" event should come before the DevTools pauses the extension.
Therefore, my question: how to receive a chrome.debugger pause event before DevTools pauses the extension?
The same can be said about breaking on an exception.
A break or an exception freezes the extension when the DevTools console is not open.
It would be nice if chrome.debugger would allow bypassing the DevTools to handle breaks and exceptions.

mare verde

unread,
Feb 13, 2023, 11:57:53 PM2/13/23
to chrome-debugging-protocol
The link to the zip file is: https://sapplic.com/dbg.zip
Reply all
Reply to author
Forward
0 new messages