3

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

3
  • It would be easier to help you if you actually named the browser you are using... Commented Jan 21, 2009 at 2:40
  • If you use IE7 for everyday browsing, and for development, how do you do debugging? Commented Jan 21, 2009 at 4:05
  • You really need to get Firefox and Firebug Commented Jan 21, 2009 at 5:28

8 Answers 8

7

Firebug lets you enable/disable debugging for different domains.

Sign up to request clarification or add additional context in comments.

Comments

7

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"

3 Comments

you need to restart IE right for each instance. maybe add 'iexplore.exe' to the end of the script and then create two shortcuts in your quicklaunch bar to run a 'debug' or 'normal' version of IE.
Yes, this requires an IE restart. I use this method even though I use Chrome for normal browsing. Your idea sounds better if you stick with IE as a primary.
Since these registry keys are user-bound, would running a browser instance as another user ("run as...") for whom debugging is enabled work?
2

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.

Comments

1

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.

Comments

1

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.

  • Comments

    0

    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.

    Comments

    0

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

    1 Comment

    Anyone know of a way to tell Chrome to open the debugger window upon F12? Firebug trained me to do that, I can't seem to break the habit. It's lame to have to go to the menu for that.
    0

    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.

    Comments

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.