I am looking for something like Debugger.Launch()
in .NET, which breaks into the debugger programmatically.
I am not looking for a cross browser way to do it, just Google Chrome is good enough.
I am looking for something like Debugger.Launch()
in .NET, which breaks into the debugger programmatically.
I am not looking for a cross browser way to do it, just Google Chrome is good enough.
Share Improve this question edited Apr 7, 2015 at 12:34 Pierre Arnaud 10.5k13 gold badges82 silver badges112 bronze badges asked Feb 27, 2012 at 9:39 markmark 62.8k94 gold badges339 silver badges667 bronze badges 2- Possible duplicate of : stackoverflow.com/questions/66420/… – DhruvPathak Commented Feb 27, 2012 at 9:41
- 2 It is similar, but I am looking for a programmatic way, so that the browser stops there automatically without any actions from me. The answer to that question talks about an interactive way, although there is a response which answers my question exactly. – mark Commented Feb 27, 2012 at 10:29
1 Answer
Reset to default 24Yes, you need to use:
debugger;
The script will break exactly at line where you put debugger
keyword.
To view it, you will first need to open Tools -> Developer tools (or pressing F12) and then by selecting your file from Scripts tab.