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: put debugger; statement in your javascript code where you want to break. e.g. function doSomething(){ //some code here... debugger; //some more code here... } launch browser debugger (F12). navigate to your web application. debugger will automatically break at the debugger; statement.