How can I debug JavaScript in Visual Studio?
To debug JavaScript in Visual Studio:
- Add the following line of code to your JavaScript:
debugger;
- Open Internet Explorer, and from the main select Tools | Internet Options.... Deselect the following settings:
- Disable Script Debugging (Internet Explorer)
- Disable Script Debugging (Other)

- Disable Script Debugging (Internet Explorer)
- Restart Internet Explorer
- When your code runs the Visual Studio Just-In-Time Debugger displays. Select the correct version of Visual Studio for debugging and click Yes:

© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 09/22/11
Comment or report problem with topic
