Not sure about you, but I have always struggled to set and enable Visual Studio breakpoints to debug my Javascript code until I have found about a magic statement named debugger.
To use it:
- Make sure “Disable Script Debugging” is unchecked in Internet Explorer, Tools (menu) -> Internet Options… (submenu) -> Advanced (tab) -> Browsing (node).
- Put the debugger; statement anywhere in your code where you want the breakpoint.
- Execute your web application and when the browser script engine interprets the statement, it launches the debugger and breaks on the statement line.
No comments:
Post a Comment