Simon_Weaver
Simon_Weaver

Reputation: 145880

How to suppress javascript errors for sites I'm not developing?

I like to keep javascript debugging enabled in my browser so when I'm developing my own code I can instantly see when I've made an error.

Of course this means I see errors on apple.com, microsoft.com, stackoverflow.com, cnn.com, facebook.com. Its quite fun sometimes to see just how much awful code there is out there being run by major sites but sometimes it gets really annoyed.

I've wondered for YEARS how to change this but never really got around to it. Its particularly annoying today and I'd really like to know of any solutions.

The only solution I have is : use a different browser for everyday browsing.

I'm hopin theres some quick and easy plugin someone can direct me to where I can toggle it on and off based upon the domain i'm on.

Edit: I generally use IE7 for everyday browsing

Upvotes: 3

Views: 3054

Answers (8)

Dwayne Charrington
Dwayne Charrington

Reputation: 6622

If you want to test and debug JavaScript, Firefox and Firebug are unrivalled in terms of features and ease of use. Chrome is not as powerful as Firebug, no matter what anyone else tells you.

Upvotes: 0

Simon_Weaver
Simon_Weaver

Reputation: 145880

Chrome doesnt bug you unless you first open the javascript debugger window

Upvotes: 0

Kristian J.
Kristian J.

Reputation: 10422

CompanionJS doesn't let you toggle debugging on a domain basis, but makes the error messages less obtrusive for casual surfing, and makes script debugging in general more user friendly.

Upvotes: 0

EndangeredMassa
EndangeredMassa

Reputation: 17528

Script Debugging in IE7 is controlled by a registry key. (An addon could probably toggle it. I just don't know of any.)

So, how I handle this is to write a registry script to turn it on or off. Then, I put a link to those scripts on my windows quick-launch bar and change their icons to be more appropriate. Then, I can just click one of the links to turn on or off IE script debugging.

Turn Off:

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Disable Script Debugger"="yes"
"DisableScriptDebuggerIE"="yes"

Turn ON:

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Disable Script Debugger"="no"
"DisableScriptDebuggerIE"="no"

Upvotes: 7

Esteban Küber
Esteban Küber

Reputation: 36832

You have two options.

  • Change and use a browser that allows you to have site specific configuration (check out Firefox with Firebug), or
  • Use different browsers for developing and everyday use.

    Upvotes: 1

  • Jason Kester
    Jason Kester

    Reputation: 6031

    I keep those annoying popups on for Internet Explorer, and you're right. It's amazing how few developers ever bother testing their code in IE. As a web developer, it's sorta your duty, right? Seeing as how it still accounts for like 60% of traffic to most sites.

    Anyway, in answer to your question, I simply switched to Chrome for everyday browsing, and only use IE for testing and developing.

    Upvotes: 1

    Bjorn
    Bjorn

    Reputation: 71810

    Firefox lets you use different profiles. Each profile can have separate preferences, themes and plugins. Start firefox on Windows this way: firefox.exe -ProfileManager to create or manage profiles.

    I use Firefox and Webkit for web debugging and Safari for regular web browsing, however. Firefox is just better for web development, and I prefer Safari overall.

    Upvotes: 2

    Breton
    Breton

    Reputation: 15582

    Firebug lets you enable/disable debugging for different domains.

    Upvotes: 7

    Related Questions