0

I wondering if javascript not a command to launch browser debugger same as c#,

System.Diagnostics.Debugger.Launch();

For the life of me, I want to put a single command in javascript code to pause debugger on that, it is so useful for productivity.

tereško
  • 57,247
  • 24
  • 95
  • 149
Hadi Sharifi
  • 1,417
  • 4
  • 17
  • 27
  • possible duplicate of [Can I programmatically open the devtools from a Google Chrome extension?](http://stackoverflow.com/questions/6801577/can-i-programmatically-open-the-devtools-from-a-google-chrome-extension) – aksu Mar 30 '14 at 07:54

1 Answers1

2

Use

debugger;

Javascript will always stop if you reach this point of code.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger

kaljak
  • 1,213
  • 1
  • 13
  • 33