Javascript debugging via “debugger;”

Sometimes my VS.NET just can’t “catch” my breakpoints in my .js files for some reason.
Yes, I made sure that the “Script” box is checked on the attached process, still, no luck.

Fortunately debugger; command is in the house !

It’s simple to use and it can be great for production debugging as well.

example (in myexample.js file):
function MyMethod()
   debugger; // ==> this will make the debugger to take over (you can use VS.NET or any other suitable program).   

   // your code to debug here.


Oren Ellenbogen


One thought on “Javascript debugging via “debugger;”

  1. Oren… you are a … you know what :)
    Thanks – that’s a great tip !!
    Never knew that one ..

Comments are closed.