The information published in this post is now out-of-date and one or more links are invalid.
—IEBlog Editor, 20 August 2012
Script debugging is turned off by default you can enable it by going to:
Tools->Internet Options…->Advanced->Disable Script Debugging
Prior to XPSP2 the above will turn script debugging on for all applications that host the WebBrowser control (Outlook for example).
On XPSP2 we’ve split the option into two:
Tools->Internet Options…->Advanced->Disable Script Debugging (Internet Explorer)
Tools->Internet Options…->Advanced->Disable Script Debugging (Other)
When you’ve enabled Script Debugging ‘View->Script Debugger’ will now be present to help you break into the debugger.
The debugger statement can also be placed anywhere in your code to suspend execution this is similar to setting a breakpoint.
The Stop statement is the VBScript version of JScript’s debugger statement.
There are three applications which I’ve used for script debugging. One is Visual Studio.Net, the second is Microsoft Script Debugger and the third is Microsoft Script Editor:
Miscrosoft Script Debugger:
You can obtain a copy of the Microsoft Script Debugger here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en
The main MSDN page for using the Microsoft Script Debugger can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_1.asp
The Microsoft Script debugger allows you to debug client side and server side scripts and provides the same functionality as most debuggers do.
Directions on using the Microsoft Script debugger can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_2.asp
Microsoft Script Editor:
The Microsoft Script Editor comes free with Microsoft Office XP/2003 with FrontPage.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfp2k2/html/odc_fpdebugscripts.asp
Visual Studio.net:
For Visual Studio.net debugging Monica Rosculet has written an excellent article on: Debugging Script Code Using Visual Studio.
Other:
Gregg Miskelly a developer on the Visual Studio team has posted some excellent information about: How Script Debugging Works.
-Phil Nachreiner
Why is is that the ‘debugger’ statement doesn’t always trigger something in the script engine. Sometimes the script engine will just ignore it. I’ve found that moving the statement around within a function can effect whether the debugger will get picked up. This has been going on since IE5 was released.
I have to say, i find the script debugger in FireFox a lot easier to use whne trying to debug js
> The debugger statement can also be placed…
Where are you linking to?
http://blogs.msdn.com/ie/archive/2004/10/26/I%20thought%20I%C3%A2%C2%80%C2%99d%20take%20a%20couple%20minutes%20to%20talk%20about%20Script%20Debugging%20and%20Internet%20Explorer ?!
minghong, thanks. I’ve corrected the debugger statement link so that it now points to the the MSDN online library.
The debugger feels far more ‘integral’ to Firefox. Like it or not, more clueless users are becoming power users. If the IE team tries to fight the transition, then they will lose, and this isn’t even talking long-term. Empower your users!
Dave, have you seen this behavior with the debugger statement with Script debugging turned on?
With Firefox are you using the Javascript Console or another plug-in debugger like: Venkman?
Thanks for your feedback
I agree that IE could use something more simple and lightweight, like Firefox’s Javascript Console. I’ve done work on sites where I made a simple error in the client-side scripting and IE would ask me if I want to start the debugger, I say yes, click OK about 6 times and then have the Script Debugger tell me it can’t get the code to show me the problem. Of course I have no idea what’s going on, because IE never gave me any clue about the error. Firefox will show a debugger-quality error message, complete with the offending line marked where the error occurred and its line number. In my opinion, Firefox simply has better usability in this area. I’ve used Venkman briefly for a few heavy javascript things, and it’s amazing!
IE devs: The majority of people that care about this blog are web developers who want to see the next IE make their lives easier. Script debugging is yet another area where the competition has you beat. We want to see some innovation!
About debugging, I tried to switch off Javascript in IE 6 SP1 the other day, this was due to that we have to support IE because of the market share, otherwise we wouldnt care. But anyway, we disabled everything on all zones with no luck. Why does it have to be so difficult? Why not like Firefox or other browsers where you can easily uncheck the "enable Javascript" checkbox?
Also, due to several Javascrip errors i downloaded Microsoft Script debugger, sometimes when i got an error and it asked me to debug, it opened up the program and no code in the window, just a blank windows.
In Firefox, when you get a javascript error, you can click on it, and automatically it will hightlight the line where the error occured, doesnt matter if its an included js file or not.
Not to mention how to find out to acutally enable error reporting without restarting the browser… Really bad user experience for a web developer. Pitty
Personnaly I nearly never need all the breakpoints and things. What I do often need are error messages that give real line numbers instead of some psuedo-random integer based on some internal version of the page thats inaccessible to me.
"IE would ask me if I want to start the debugger, I say yes, click OK about 6 times and then have the Script Debugger tell me it can’t get the code to show me the problem"
yeah, the script debugger gets severely confused when it comes to included javascript files….. makes debugging a royal pia
last i checked, Netscape’s javascript debugger was way better.
For the life of me I cannot get script debugging working after installing Web Developer Express. I’ve tried installing Microsoft Script Debugger again, and it will actually pop up when an error occurs, but the window is completely empty (no source loaded.)
I’m ripping my hair out. Any help would be appreciated.
Phil, i’m just using the js console that comes with FireFox as standard. I will definatly try Venkman though.
What everyone else has said pretty much sums up my feelings. The ff js console is just so much quicker and easier.
How on earth does one debug an ASP script?
I can’t seem to get it to work as I think it should. I’ve got IIS 6 (win 2003) set to debug ASP server side. I’ve got script debugger installed. I run a script with a deliberate divide by zero error in it, and I get nothing. Just a normal error message in IE as always.
What am I missing!
I am having the same problem as Nicholas. The debugger opens but it is blank. I am not running SP2. Could that be the problem?
Make IE not ask to debug:
http://www.tweaksforgeeks.com/IEDebug.html
if you ever have to debug javascript in internet explorer, you really want to go and download the free visual…
PingBack from http://www.infor96.com/~nio/archives/177
PingBack from http://doublewei.wordpress.com/2006/04/08/links-for-2006-04-08/
PingBack from http://www.zorched.net/2006/04/28/javascript-toolkits/
PingBack from http://www.blackbirdblog.it/blog/archivio/2006/05/25/firebug-debugger/
Microsoft-Entwickler wissen um die Vorzüge von ASP .NET, und einige der NETzWERK-Mitglieder haben sich…
Hi there!   My name is Laurel Reitman and I’m a Lead Program Manager on the Internet Explorer…
PingBack from http://caiwangqin.wordpress.com/2006/06/30/links-for-2006-06-29/
I had a difficult problem with broadcasting powerpoint presentation. The tool I want to use can be found…
From an IEBlog I’ve finally found how you can debug JavaScript ising Microsoft Internet Explorer. This article discusses the things you need to enable and install on your MS Windows machine.
Unfortunately I still don’t understand why the script I use
PingBack from http://scriptia.net/2006/09/jslog-un-logger-ligero-para-javascript.html
Selenium Core FAQ This is an initial list of FAQs that have been collected for Selenium Core. We encourage people to add to this list and continue feedback on the items listed below: # (?) What is Selenium for?…
PingBack from http://stubblog.wordpress.com/2006/11/10/links-for-2006-11-10/
PingBack from http://gabrito.com/post/javascript-debugging-in-internet-explorer
PingBack from http://wizardishungry.com/blog/archive/when-to-use-google-to-solve-your-problems-and-when-to-solve-things-yourself
Γενικά βρίσκω πολύ χρήσιμο να κάνω debugging σε ότι φτιάχνω.. Πρόσφατα χρειάστηκε να φτιάξω κάτι σε JavaScript
We had a great chat today, thanks to everyone who came out, and to Chris, Markus, Alex and Dave who were
PingBack from http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=11c471d6-ea65-4ed2-b387-c9ec966d8418
FirefoxであればFirebugで簡単に問題の場所をみつけられますが、IEでjavascriptのエラーが出ると、素っ気な…
PingBack from http://brosinski.com/stephan/2007/04/20/ie-developer-toolbar/
PingBack from http://www.thinknext.net/archives/1844
PingBack from http://www.shinstudio.com/sh.kim/?p=244
PingBack from http://mangiucugna.wordpress.com/2007/07/04/debugging-javascript-con-internet-explorer/
PingBack from http://blog.james-carr.org/?p=89
PingBack from http://recurser.com/articles/2007/07/26/jscript-debugger-for-ie/
PingBack from http://simpledream.net/2007/08/09/interesting-links-15/
PingBack from http://www.klauskomenda.com/archives/2007/08/17/debugging-ie/
ohio state university football stadium
PingBack from http://www.jarrodgoddard.com/web-development/internet-explorer-7-javascript-debugging
PingBack from http://gerzsonka.wordpress.com/2007/12/18/par-szo-az-ie-debug-funkciojarol/
PingBack from http://xhtmlforum.de/49565-zusammenh-ngender-quelltext-f-r-ie-2.html#post364207
PingBack from http://blog.evandavey.com/2008/02/how-to-debugging-javascript-in-ie-with-microsoft-script-debugger.html
PingBack from http://forum.fachinformatiker.de/skript-webserverprogrammierung/114213-javascript-ie-firefox.html#post1037901
PingBack from http://mikepence.wordpress.com/2008/05/14/links-for-2008-05-15/
PingBack from http://wangyu15.yo2.cn/articles/%e8%bf%9b%e8%a1%8c-html%e3%80%81javascript-%e5%92%8c-ajax-%e5%bc%80%e5%8f%91%e5%92%8c%e8%b0%83%e8%af%95%e7%9a%84%e5%bf%85%e7%94%a8%e5%b7%a5%e5%85%b7.html
PingBack from http://mrlauer.wordpress.com/2008/06/05/debugging-javascript-now-in-opera/
PingBack from http://samuel.picturesitedirect.com/allowscriptsininternetexplorer.html
PingBack from http://crmwiz.wordpress.com/2008/06/15/essential-tools-for-tailoring-crm/
PingBack from http://brogan.topmatingstories.com/programminghelpblogsie.html
PingBack from http://alexia.bestvidsdigest.info/internetscripts.html
使用最好的开源工具处理Web页面、脚本和样式,简化新站点和页面的开发。动态检查和修改HTML标记、CSS和JavaScript,检查DOM以及客户机-服务器通信并了解bookmark…
PingBack from http://soulsdesign.wordpress.com/2008/09/11/internet-explorer-6-debug/
PingBack from http://www.hilpers.com/1030161-javascript-debuggen
PingBack from http://www.php.de/javascript-ajax-und-mehr/50886-internet-explorer-und-immediatedescendants.html#post395586
PingBack from http://www.php.de/javascript-ajax-und-mehr/50886-internet-explorer-und-immediatedescendants.html#post395587
PingBack from http://www.hilpers.pl/233768-debugger-js-dla-ie
PingBack from http://darkviews.wordpress.com/2007/07/06/debugging-ajax-applications-with-ie/
PingBack from http://paidsurveyshub.info/story.php?title=ieblog-scripting-debugging-in-internet-explorer
PingBack from http://woodtvstand.info/story.php?id=90549
PingBack from http://hairgrowthproducts.info/story.php?id=2047
PingBack from http://mydebtconsolidator.info/story.php?id=21717
PingBack from http://workfromhomecareer.info/story.php?id=19050
Very helpful thank you.