[When debugging in chrome, the scripts are always paused in the debugger even if there are no break points set, and if the the pause is un-paused, it again pauses itself.][1]
Open your chrome dev tool and go to your settings
under preference select disable javaScript
Related
In recent versions of Chrome-based browsers, for some reason (probably, not a bug, it's a feature), after debug mode is detached, Chrome leaves this notification:
"Programm started debugging this browser"
Screenshot
Basically, I run this code
let debugee = {tabId: sender.tab.id};
chrome.debugger.attach(debugee, '1.2', ()=>{});
chrome.debugger.detach(debugee);
And see the picture above. Chrome removed this notification on detach until version 80 (or so).
I've found the description of the issue:
https://chromium.googlesource.com/chromium/src/+/HEAD/chrome/app/generated_resources.grd
<!-- DevTools attached infobar -->
<message name="IDS_DEV_TOOLS_INFOBAR_LABEL" desc="Label displayed in an infobar when external debugger is attached to the browser. The label does not disappear until the user dismisses it, even if the debugger is detached, and so should not imply that the debugger must still be debugging the browser, only that it was, and could still be.">
"<ph name="CLIENT_NAME">$1<ex>Extension Foo</ex></ph>" started debugging this browser
</message>
I'm looking for a suggestion on how to clear or disable this message automatically, from the chrome extension.
TL;DR there's no such method.
The new behavior in Chrome is the consequence of an awkward fix for a security problem: a malicious extension can quickly do a lot of damage via chrome.debugger API and no one will know that something even happened if the work was performed in less than say 100ms.
Since a security problem was involved, the old behavior won't be restored, but they agreed the UI should at least reflect the current debugger state, see https://crbug.com/1096262. Their current plan is to auto-close the infobar after being visible for >=5s if the extension has detached and update the buttons/strings to be in sync with state.
A workaround is to run chrome with --silent-debugger-extension-api command line switch. It's a dangerous switch though in the sense that you'll have to be careful not to install a malicious extension that uses debugger permission either right away or upon an update.
Firefox allows you to close the console while keeping their device mode open. Is there a way to do this with Chrome's DevTools?
Thanks.
Device Mode closes when DevTools closes. So strictly speaking, no. This is not possible.
A possible workaround is to undock DevTools by opening the Command Menu and then typing Undock and then pressing Enter to run the command. DevTools undocks to a separate window, which you can then minimize.
Is there a way to prevent the chrome dev tools from stealing the focus if you stop the debugger / reach a breakpoint?
I'm debugging with intellij js debug and chrome is stealing its focus on every step.
In the Chrome DevTools Settings under Preferences -> Sources, there is an option "Focus Sources panel when triggering a breakpoint". Disabling this option seems to fix the issue.
That is really annoying, my kind of solution is to set the size of the Chrome window very small and then navigate using the Chrome Debugger Shortcuts (F10, F11, F8) and not the WebStorm/IntelliJ ones (F8, F7, F9), then it kind of works. Chrome stays in focus, but it is small and you see it stepping normally in the WebStorm.
When the chrome web inspector has paused due to a debugger breakpoint,
how can one resume execution without using the mouse?
Is there like a
debugger.continue()
I can issue in the console repl
There is no debugger.continue() since it is a keyword, but you can disable breakpoints:
We are trying to run some automated tests (coded ui based) on our mobile application via Chrome browser.
In order to make the tests available to run, we must set the browser to work as 'emulate touch events'.
The thing is that as part of our test flow, a new chrome browser is being launched on each test but the definition is gone.
I already check this one, but it doesn't work:
How to Always Emulate Touch Events in Chrome Dev Tools?
Any other suggestions?
Thanks,
Yair
I believe that the dev tools window must be opened for the overrides to kick in, have you tried that?