Support question - what command line option to use to force the debugger to stop at debugger; statements
Reported by
alexande...@gmail.com,
Oct 26 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: 1. Launch Chrome with Chrome-Launcher NPM module 2. Litter the codebase with `debugger;` statements 3. When the browser runs, it does not stop at any debugger; statements What is the expected behavior? I am just looking for a command line flag to use to launch the browser in debugging mode so it will stop at the first debugger; statement. What went wrong? I am just looking for a command line flag to use to launch the browser in debugging mode so it will stop at the first debugger; statement. Did this work before? N/A Chrome version: 61.0.3163.100 Channel: n/a OS Version: OS X 10.12.6 Flash Version:
,
Oct 27 2017
Thanks sounds tricky, will try to figure it out.
,
Oct 30 2017
alexander.d.mills@ - Thanks for filing the issue...!! Could you please provide a sample test file to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Oct 30 2017
Yeah, here is what I don't understand - there's no good way to connect to a process that hasn't started yet. If I launch Chrome and tell it to open a url, can I magically stop chrome from any further processing by connecting to it with another process (a "remove debugger"? Seems weird that we cannot launch Chrome and tell it to stop at the first breakpoint or first debugger; statement. In other words, how can we force chrome to stop at the first debugger statement, if it takes 50 - 300 milliseconds to connect to the chrome browser with another process? So confused.
,
Oct 30 2017
I meant a *remote debugger* not *remove debugger*
,
Oct 30 2017
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30 2017
Current design is to refresh the page if you need to hit early debugger statement or a breakpoint.
,
Oct 30 2017
Ok so I can use window.location.reload() to hit the first debugger; statement...is there a JavaScript hook in the browser I can use to capture a remote process connecting to the browser? Something like this:
window.onDebuggerConnect = function(event){
// great! remote process has connected a debugging session
// now we reload the page, so that firs debugger; statement can be reached
window.location.reload();
}
,
Nov 3 2017
No. But you can do the refresh from the debugger, e.g. pressing Ctrl+R in DevTools sends a command to the target to refresh.
,
Dec 1 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kozy@chromium.org
, Oct 27 2017