473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Can't inspect or watch variable in Microsoft Script Debugger.

I have a javascript program that works fine under Firefox and on IE
when running XP, but is having a problem with IE running under Windows
2000 Pro.

On my personal XP development machine I have the Microsoft Script
Editor and I can set a breakpoint, step through code, inspect
variables, etc... with no problem.

On a machine where I am trying to debug this problem I am running
Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger.
When the program hits the exception the script debugger will come up
and show me the line where the error occurred.

I need to be able to inspect the variables to determine the problem.
However, from what I can tell, there isn't anywhere to inspect or watch
the variables in MSD?

Am I missing something?

-alan

Oct 3 '06 #1
4 5910
ar*****@gmail.com wrote in comp.lang.javascript:
I have a javascript program that works fine under Firefox and on IE
when running XP, but is having a problem with IE running under Windows
2000 Pro.

On my personal XP development machine I have the Microsoft Script
Editor and I can set a breakpoint, step through code, inspect
variables, etc... with no problem.

On a machine where I am trying to debug this problem I am running
Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger.
When the program hits the exception the script debugger will come up
and show me the line where the error occurred.

I need to be able to inspect the variables to determine the problem.
However, from what I can tell, there isn't anywhere to inspect or watch
the variables in MSD?

Am I missing something?
No, the MS Script Debugger is as useless and unimproved as IE 6, which has
been around eons. You can debug (monitor variables) through alerts or
inserting text in the browser content. But the debugger doesn't even name
the file (external JS file). MS doesn't seem particularly motivated to
improve its HTTP client; must be satisfied that a majority of PC users
will be using some form of IE rather than switch. Although the news says
that other browsers are gaining ground.

Don't take my word for it:

http://roho2003.blogspot.com/2005_12...3_archive.html
http://smotricz.blogspot.com/2004_06...z_archive.html
http://blogs.opensymphony.com/plight...bugging_with_v
isu.html

Oct 3 '06 #2

<ar*****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have a javascript program that works fine under Firefox and on IE
when running XP, but is having a problem with IE running under Windows
2000 Pro.

On my personal XP development machine I have the Microsoft Script
Editor and I can set a breakpoint, step through code, inspect
variables, etc... with no problem.

On a machine where I am trying to debug this problem I am running
Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger.
When the program hits the exception the script debugger will come up
and show me the line where the error occurred.
You can inspect variables using my debugger library but it won't let you do
breakpoints or anything like that (there's no way to do that with plain
vanilla javascript):

http://www.depressedpress.com/Conten...ions/DP_Debug/

I find it very useful, I hope youdo as well.

Jim Davis
Oct 4 '06 #3
Okay, for anyone having similar problems. Here is what I have
discovered:

First, the "free" Microsoft script debugger is nearly useless. I will
show you the line where the program threw an exception. You can
inspect variables to a point. You can use the Command window to see if
variables are null or if the variable is a primitive type (number,
string, etc..), but you can't inspect any complex objects. I guess you
can also change the values, but that is about it. I didn't find any
good documentation for this from Microsoft (no surprise there) but the
following link helped out:

Debugging JavaScript in Your Applications:
http://www.codestore.net/store.nsf/u...W?OpenDocument

Second, if you have access to Microsoft Frontpage you can optionally
install the Microsoft Script Editor (MSE). It is also available in
Visual Studio. This is actually a pretty nice debugger once its all
installed. I just think it should be either bundled with IE or
available for a free download.

Microsoft Script Editor:
http://erik.eae.net/archives/2005/07/04/21.49.50/

Third, another useful tool is the LumberJack logger. This is pretty
cool. You will need the prototype library as well, but it is a neat
way to add logging in a way similar to Log4j into your java script.
Beats the heck out of adding a bunch of "alert" statements, and will
even work on an end-user's machine without requiring them to install
additional software. It also works in both Firefox and IE.

LumberJack: http://gleepglop.com/javascripts/logger/

If you have read this far, I'll give you another couple of pieces of
advise on debugging javascript. I have found using a combination of
tools for both FireFox and IE seems to be the best approach. Both
systems have their advantages and disadvantages, but The following set
of tools seem to work pretty well when used in combination. I have
also found that, even though my company only "officially" supports IE,
my javascript is more stable if I build for BOTH IE and FireFox. It is
more work, but it pays off in the end.

First, for IE get the Microsoft Web Developers toolbar. It allows you
to inspect the entire DOM and has some useful tools like a ruler and
such...

Microsoft Web Developers Toolbar:

http://javascript.weblogsinc.com/200...oolbar-for-ie/

For Firefox, you should get the Firebox debugger. It is the
counterpart to the Microsoft Script Editor.

Firebug:
https://addons.mozilla.org/firefox/1843/

Also use the FireFox DOM inspector:
FireFox DOM Inspector:
http://www.mozilla.org/projects/inspector/

Finally, in case you are interested, there is a slight difference
between how the 2000 version of Javascript was passing variables to
anoymous functions during an AJAX request call and the XP version.
Once I realized the problem it took me a very short amount of time to
fix. It tooks me a while to figure out the actual cause of the problem
because it was a couple of levels up the call stack and without a
descent debugger it took a lot of time to run down.

-alan

Oct 4 '06 #4
Thanks to both Jim Davis and Patient Guy for your help. I appreciate
it very much.
-alan

Jim Davis wrote:
<ar*****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
I have a javascript program that works fine under Firefox and on IE
when running XP, but is having a problem with IE running under Windows
2000 Pro.

On my personal XP development machine I have the Microsoft Script
Editor and I can set a breakpoint, step through code, inspect
variables, etc... with no problem.

On a machine where I am trying to debug this problem I am running
Windows 2000 Pro with IE 6. I installed the Microsoft Script Debugger.
When the program hits the exception the script debugger will come up
and show me the line where the error occurred.

You can inspect variables using my debugger library but it won't let you do
breakpoints or anything like that (there's no way to do that with plain
vanilla javascript):

http://www.depressedpress.com/Conten...ions/DP_Debug/

I find it very useful, I hope youdo as well.

Jim Davis
Oct 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Katie M | last post by:
Hi, I'm running into a problem where the Microsoft Script Debugger is no longer starting up when it encounters an error or breakpoint. It used to prompt whenever it encountered an error, but is...
1
by: John H. | last post by:
I installed the Microsoft Script Debugger and set the "Enable Script Debug" flag on in IIS. Also, I made sure that the "Disable Script Debug" flag was off in Internet Explorer. Everything ran...
5
by: Vilmar Brazão de Oliveira | last post by:
HI there, Does anybody know why Microsoft Script Encoder can not encript(encode) all the page including html, js, vbs and asp parts? - In asp case only encoded the asp part. Page.asp - In html...
2
by: Steve Anderson | last post by:
Please excuse my ignorance as I'm fairly new to ASP. We have IIS running on Win2000 and serving out an ASP application. I installed the script debugger tonight. IE6 on the machine has Disable...
5
by: cyaron | last post by:
Hi, I would like to ask for your help I would like to download debugger for javascript. Since I works only with IE I thought of trying using the Microsoft Script Debugger. I found the...
1
by: Dennis | last post by:
I have installed Microsoft Script Debugger. But when I select the Running Documents option from the view menu, there is nothing but an empty window displayed. I wish to debug ASP pages. ...
2
by: Andrew Taranov | last post by:
Hi! I've got a problem attaching the Script Debugger to ASP pages under IIS6. Set up everything following IIS6 documentation: turned on ASP debug in IIS Manager; edited permissions for Machine...
2
by: Atul | last post by:
Hi, How can I "disable script debugger" programmatically using C#? Its similar action when we check the check box from IE (Tools | Internet Options...| Advanced). Any ideas??? Thanks Atul
2
by: Bruce Johnson | last post by:
Two issues. Using IE 6 (all patches) over XP Pro (all patches) along with mse7.exe (Microsoft script editor) from Office 2003. I can get HTML pages etc into the editor with no problems. I want to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.