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
  • 58,060
  • 25
  • 98
  • 150
Hadi Sharifi
  • 1,497
  • 5
  • 18
  • 28
  • 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,263
  • 1
  • 16
  • 34