1. Enable client script debugging on IE:
2. Start debugging in Visual Web Developer (F5)
3. Bring up the Script Explorer window (Ctrl+Alt+N):
4. Once the Script Explorer window is opened, double click on the run-time document that you want to debug:
5. Now you can set a breakpoint in the run-time document:
The script execution will pause on the breakpoint when you execute the script. You can then examine objects at this point of the execution. For example, you can bring up the Quick Watch window and examine the data of the document object.
If you need to debug something during a page load, you can use the debugger statement:
Enjoy!
Barry Tang
Software Design Engineer
Visual Studio Web Tools