views:

619

answers:

4

In order to debug an asp.net web app I have to have IE Script debugging enabled. Unfortunately, in the past week or so google's analytics javascript has developed a problem. So that when I browse to a site that has google analytics I receive the little pop up "A runtime error has occurred. Do you wish to debug?"

Yes, even stackoverflow is affected.

This is a tremendous pain in the butt. Is there any way to keep IE Script debugging enabled to keep the .net debugger happy, but get rid of the pop up?

+2  A: 

Script Debugging is not required to debug ASP.NET pages, it is only required if you wish to stepthrough script errors, you can disable this option in IE and still debug your server code fine. Unfortunately it is an IE wide option so if it's on it's on and if it's off it's off.

But disabling the option will not prevent you from debugging your asp.net applications.

Quintin Robinson
+4  A: 

I would suggest using IE for debugging purposes only, and Firefox for darn near everything else. Your life will benefit from this.

Nick Sergeant
Unfortunately, this seems to be the only viable answer. Thanks.
Chris Lively
+2  A: 

Are you debugging javascript behaviour specifically in IE? If not, get Firefox and Firebug. Javascript debugging in IE is painful, and should only be resorted to in situations where you're trying to fix IE idiosyncrasies. You don't need script debugging enabled in IE if you're just debugging web forms.

mmacaulay
+1  A: 

You could write some code to make a change to the following key in the Registry

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Disable Script Debugger

Depending on how you have your project you might be able to tie it to the actual build (via a Macro), or if anything just put it somewhere in your Application_Start event.

Returning back to normal might be a little more difficult. Potentially you could watch for the iexplore.exe process and when it dies you revert it back.

Hope that helps.

Hugoware