Easily Disable JavaScript Debugging in Visual Studio 2008

The development experience in Visual Studio 2008 beats the experience in any previous release hands-down.  However, the addition of JavaScript debugging has caused me a slight issue.  While debugging solutions that contain JavaScript, you may have noticed that a additional tree node that pops up in the Solution Explorer called Script Documents.  This node represents all of the current JavaScript sources for the current request. 

Script Documents

This is a great feature, but if you have lots of JavaScript, it can really damage your productivity, especially if you aren't working on the JavaScript code at the moment.  You see, if you use components that are heavy in JavaScript like he ASP.NET components from DevExpress, Visual Studio spends a good deal of time, unloading the Script Documents from the current page and loading the Script Documents for the next page.  It really doesn't take long to get fed up and start looking for an answer.

So, after a little research, I found that the Script Documents node only appears when you have Script Debugging Enabled.  You can toggle these settings in your Internet Explorer settings:

Internet Options

So here are the issues that I have set out to solve:

  • The productivity loss from waiting on the Script Documents node to load up is substantial.
  • I couldn't find a way to disable the Script Documents node from inside of Visual Studio (although there may be a hidden registry setting for doing so).
  • It's fairly annoying to have to toggle these settings in Internet Explorer each time you wish to hide the Script Documents node.

 

Toggle Script Debugging Addin for Visual Studio 2008
I've built an addin for Visual Studio 2008 that will allow you to quickly toggle JavaScript debugging from inside of Visual Studio.  When you don't need to debug JavaScript files, simply click on the addin icon and Script debugging will be disabled.  When you need Script debugging again, simply enable Script Debugging by clicking the addin icon once more:

image Disabled

That's really all there is to it.  The project is hosted on CodePlex so go download it and give it a shot!  Enjoy!

Download the Add-in Here

Version: 1.0.0
Date Published: 4/24/2008
Requirements: Visual Studio 2008


Feedback

# re: Easily Disable JavaScript Debugging in Visual Studio 2008

Gravatar Hi.

Last time I got annoyed by the "Script Documents", I ended up in a microsoft forum, telling us that they were going to reduce the amount of nodes given in the debug tree. Well, haven't seen any change of that, so I had to give it another try. Your article was about the first hit on google, so I'm surprised that this is the first response...

BRILLIANT IDEA!! I'm using DevExpress, and they're using javascript heavily. Disabling the script debugging in IE made a huge difference, and this button makes it easy to switch it on/off.

Thanks! 4/29/2008 5:10 AM | Anders Øyvind

# re: Easily Disable JavaScript Debugging in Visual Studio 2008

Gravatar Anders,
I'm glad I could help you! Please spread the word! 4/30/2008 8:51 PM | Page Brooks

Comments have been closed on this topic.