New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778781 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

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 description

UserAgent: 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:
 

Comment 1 by kozy@chromium.org, Oct 27 2017

You need to connect to your Chrome using DevTools protocol [1] and then enable Debugger domain and listen for Debugger.paused notification. There is no command line flag to automatically enable it, since it should be a client for Debugger.paused notification.

[1] https://github.com/cyrus-and/chrome-remote-interface

Thanks sounds tricky, will try to figure it out.
Cc: krajshree@chromium.org
Labels: Needs-Milestone Needs-Feedback
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...!!
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.
I meant a *remote debugger* not *remove debugger*
Project Member

Comment 6 by sheriffbot@chromium.org, Oct 30 2017

Labels: -Needs-Feedback
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
Current design is to refresh the page if you need to hit early debugger statement or a breakpoint.
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();
}
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
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.
Status: WontFix (was: Assigned)

Sign in to add a comment