Sign in
Home
Microsoft Blog Images
More ...
Scripting Debugging in Internet Explorer
IEBlog
The Windows Internet Explorer Weblog
Common Tasks
Blog Home
Email Blog Author
RSS for Comments
RSS for Posts
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Search
Recent Posts
Add-on Performance part 2: Helping consumers make informed decisions
Posted
Tue, Aug 31 2010
by
ieblog
16
Comments
Getting Ready for SVG Open
Posted
Tue, Aug 31 2010
by
ieblog
18
Comments
Performance: Profiling how different web sites use browser subsystems
Posted
Mon, Aug 30 2010
by
ieblog
14
Comments
More on SVG
Posted
Fri, Aug 27 2010
by
ieblog
68
Comments
Chakra: Interoperability Means More Than Just Standards
Posted
Wed, Aug 25 2010
by
ieblog
48
Comments
Tags
Accelerators
Add-ons
Browsing the Web
Compatibility
Conferences
CSS
Developers
end-users
ES5
feedback
General IE Information
HTML5
IE Announcements
IE on the Web
IEBlog
Inside IE
IT PRO
Performance
Platform
Security
svg
Testing
Tips and Tricks
W3C
Windows 7
Archives
Archives
August 2010
(14)
July 2010
(6)
June 2010
(16)
May 2010
(9)
April 2010
(10)
March 2010
(21)
February 2010
(5)
January 2010
(4)
December 2009
(3)
November 2009
(4)
October 2009
(3)
September 2009
(3)
August 2009
(4)
July 2009
(7)
June 2009
(9)
May 2009
(15)
April 2009
(11)
March 2009
(19)
February 2009
(15)
January 2009
(15)
December 2008
(8)
November 2008
(2)
October 2008
(7)
September 2008
(19)
August 2008
(13)
July 2008
(8)
June 2008
(9)
May 2008
(6)
April 2008
(9)
March 2008
(22)
February 2008
(4)
January 2008
(3)
December 2007
(5)
November 2007
(3)
October 2007
(4)
September 2007
(1)
August 2007
(6)
July 2007
(1)
June 2007
(4)
May 2007
(6)
April 2007
(6)
March 2007
(9)
February 2007
(8)
January 2007
(10)
December 2006
(6)
November 2006
(13)
October 2006
(20)
September 2006
(14)
August 2006
(22)
July 2006
(10)
June 2006
(16)
May 2006
(12)
April 2006
(13)
March 2006
(20)
February 2006
(30)
January 2006
(9)
December 2005
(8)
November 2005
(6)
October 2005
(6)
September 2005
(15)
August 2005
(13)
July 2005
(10)
June 2005
(11)
May 2005
(9)
April 2005
(8)
March 2005
(8)
February 2005
(9)
January 2005
(8)
December 2004
(5)
November 2004
(3)
October 2004
(8)
September 2004
(6)
August 2004
(9)
July 2004
(10)
IE Sites
Internet Explorer Home Page
Internet Explorer Developer Center
Internet Explorer Feedback
The JScript blog
Engineering Windows 7 Blog
Internet Explorer Test Center
EricLaw's IEInternals Blog
Exploring IE
Other Sites
Channel 9
Protect your PC
Microsoft Security Home Page
MSDN Blogs
>
IEBlog
>
Scripting Debugging in Internet Explorer
Scripting Debugging in Internet Explorer
Rate This
ieblog
26 Oct 2004 8:24 AM
Comments
69
I thought I’d take a couple minutes to talk about Script Debugging and Internet Explorer.
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
69 Comments
General IE Information
Comments
Dave
26 Oct 2004 8:57 AM
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.
Dave
26 Oct 2004 9:08 AM
I have to say, i find the script debugger in FireFox a lot easier to use whne trying to debug js
minghong
26 Oct 2004 9:26 AM
> 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
?!
Phil Nachreiner [MSFT]
26 Oct 2004 10:42 AM
minghong, thanks. I've corrected the debugger statement link so that it now points to the the MSDN online library.
Roger
26 Oct 2004 10:42 AM
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!
Phil Nachreiner [MSFT]
26 Oct 2004 10:46 AM
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 :)
Jason
26 Oct 2004 11:06 AM
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!
José Sanchez
26 Oct 2004 12:11 PM
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
I Hate It
26 Oct 2004 12:48 PM
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.
Steve
26 Oct 2004 1:14 PM
"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
a
27 Oct 2004 10:58 AM
last i checked, Netscape's javascript debugger was way better.
Dave
28 Oct 2004 11:51 AM
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.
Bryan
31 Oct 2004 3:25 PM
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!
Sootah
7 Nov 2004 9:48 PM
Make IE not ask to debug:
http://www.tweaksforgeeks.com/IEDebug.html
Nicholas@pdsys.org
17 Nov 2004 11:48 AM
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.
Page 1 of 5 (69 items)
1
2
3
4
5