Disabling script debugging in VS 2008 + IE8


Visual Studio 2008 shipped with a feature to automatically enable script debugging when starting IE8 from Visual Studio. In other words, if you are using VS 2008 and IE8, there is no longer a need to tweak IE options to debug your site.


However, this feature unfortunately created a problem which we didn’t notice before VS 2008 shipped – web sites which create a large number of dynamic documents can perform quite poorly under the debugger, and now there is no option to run your site outside the debugger. If you open solution explorer and see the document list under ‘Script Documents’ dance up and down, you are running into this problem.


Work around:



  1. This work around requires the Silverlight 2 Tools for Visual Studio 2008 SP1 to be installed. So if you don’t have these tools installed, you can download them from Microsoft (http://www.microsoft.com/downloads/details.aspx?familyid=C22D6A7B-546F-4407-8EF6-D60C8EE221ED&displaylang=en). If this is not an option for you, there is some alternative work arounds at the bottom of this blog post.

  2. Right click on your project and open up project properties

  3. Go to the ‘Start Options’ sheet, and click the ‘Silverlight’ button at the bottom of the screen. Because the debugger cannot debug both Silverlight code and Script code at the same time, this will disable Script debugging and therefore avoid the problem.

Request for feedback:


If you want to disable script debugging, I would love to hear about your scenario. We are aware of the performance issues with applications that create many documents. We hope to address this in a future version of Visual Studio.


Alternative work around – disable all script debugging:



  • Open a new command prompt (start->run, cmd.exe). If you are on a 64-bit computer this needs to be a 32-bit prompt (start->run, c:\windows\syswow64\cmd.exe)

  • reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f

If you are using Visual Web Developer Express, replace ‘VisualStudio’ with ‘VWDExpress’:



  • reg add HKLM\SOFTWARE\Microsoft\VWDExpress\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f

If you want to restore your computer so that you can debug scripts again:



  • reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {170EC3FC-4E80-40AB-A85A-55900C7C70DE} /f

Work around for performance problems caused by ‘anonymous code’ nodes:


Some sites run into problems being debugged due to numerous “anonymous code” nodes in solution explorer. For these sites, instead of disabling script debugging completely, it’s possible to disable just the ‘anonymous code’ nodes. This requires Visual Studio 2008 SP1. To do so:



  • reg add HKCU\Software\Microsoft\VisualStudio\9.0\Debugger /v HideAnonymousScriptCodeNodes /t REG_DWORD /d 1 /f


Comments (8)

  1. Visual Studio 2008, Internet Explorer 8 e il debug degli script

  2. Quando si esegue un sito Web da Visual Studio 2008, se esso viene visualizzato all'interno del browser

  3. Brian says:

    Thank you!

    I’ve logged issues on the connect site for VS about this issue and was given the anonymous node work around that helped, but not nearly enough.

    The silverlight install fixed my problem completely!

    Its rare that I debug scripts, and the silverlight workaround gives me an easy option to turn script debugging on and off at will.

  4. Ben Griswold says:

    Thanks for this post. Though I wasn’t able to get the anonymous code fix to take with VS2008 SP1, disabling script debugging completely worked like a charm. Since this is effectively the scenerio I was dealing with in IE7 I’m happy. Thanks a bunch.

  5. James Talbot says:

    This has speeded up development. Thanks.

  6. Paul Hewson says:

    With the Silverlight workaround, it does prevent Visual Studio from debugging the script.  However when there’s a script error, IE still launches a "Webpage Error" dialog, despite having script debugging turned off in IE advanced settings.  This is a pain because the script errors are caused by third party components (but aren’t causing any functionality problems.)  It would be much cleaner to respect IE’s settings in debugging ASP.NET.  Hopefully some update of VS2008 can fix this, or I’ll end up going back to IE7.

  7. Thanks for the workaround!

    It helped me a lot!