javascript break in browser debugger

While doing web (html+js) development, sometimes it's tedious to open your javascript code and put breakpoint in browser debugger to debug the code. This becomes even more difficult when you have to debug the code that gets executed on start up.

here is an easy solution:
  1. put debugger; statement in your javascript code where you want to break. e.g.
    function doSomething(){
       //some code here...
       debugger;
       //some more code here...
    }
  2. launch browser debugger (F12).
  3. navigate to your web application.
debugger will automatically break at the debugger; statement.

Comments

Popular posts from this blog

Asp.Net concurrent requests from same session