Thanks heaps, Ganeshji! :o)

Chris

Ganeshji Marwaha wrote:
Once u have debugger installed and *enabled*, IE should automatically break when a js error is encountered. Typically IE will ask you if u wanna debug this error or not. Clicking "debug" will open the script editor and stop execution on the line of code where the error was encountered. This is one of the ways to getting into the debugger at runtime.

Another way is to add the command "debugger" anywhere in your js code. Debugger will break on that statement automatically as well.

There are many more options that u can set to get into debug mode...

Eitherways, once you are inside the debugger, there are quite a few things u can do...

1. you can see a window titled "immediate window". This is one of the most useful windows there. Here, whatever js command u type in is executed and the result displayed right there. This enables you to check the behavior of various methods, values of objects, elements etc.

2. There should be a call stack window somewhere, which will help u see the flow of method calls that lead u to where u are... this can be very useful to debug pretty annoying errors.

3. then, coming to the primary functionality of a debugger. You can step into, step out, step through code, one line at a time. This way u can see what is stored in each variable during execution of each line.

4. There is a watch feature, in which u can type in some expression and always keep an eye on what the expression returns while stepping through the debugger. this is different from immediate window in that, the expression is evaluated only once in the immediate window, whereas the watch keeps track of the current value of the expression always.

5. There is a local variable window somewhere, where u can see the values of all the local variables.

There is more you can do with it

A very basic tutorial can be found here as well. http://ciquat.blogspot.com/2006/01/reliable-javascript-debugging-with.html

- GTG

On 6/28/07, *Christopher Jordan* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Okay, so after looking for a while online it seems that most
    people think that Microsoft Script Editor is superior in debugging
    to Visual Studio or Microsoft Script Debugger. So, I've got MSE
    installed, and now I'm having trouble using it. I'll admit to
    never having used a debugger before. I've always just used alerts,
    and dumps and such in my code to stop the program flow or to tell
    me the value of some variable.

    The stuff I've read online so far just seem to be talking about
    how to enable debugging in IE and then how to start the debugger.
    They don't really cover what to do when once the debugger opens.

    Can anyone help me with using this thing? Or can someone point me
    to a good resource on learning to use this debugger?

    Thanks heaps!
    Chris

    Ganeshji Marwaha wrote:
    yes, u r right, u have to have one of those applications... i
    have used both script debugger and script editor. both are ok...
    so, first download and install it... and then follow the
    instructions that is given on the top of the blog entry. This
    should result in ur view->script debuggger menu...

    if it doesnt, then goto options, disable script debbugging, the
    close IE, then open IE again, then enable script debugging again,
    then close IE and then open IE again. it should work...

    -GTG

    On 6/27/07, *Chris Jordan* < [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:


        Thanks heaps, Mike! I've a question though.

        That blog entry you point to says:

        "When you've enabled Script Debugging 'View->Script Debugger'
        will now
        be present to help you break into the debugger."

        But, I'm not finding that's the case. Also, it goes on to
        talk about
        three applications that the author has used for script
        debugging. Do I
        have to have one of those in order to debug? Why don't I have
        the
        'View->Script Debugger'? Have you used this debugger in IE?
        How many
        angels can dance on the head of a pin? What are the eleven secret
        herbs and spices in Kentucky Fried Chicken? Can God make a
        rock so
        heavy even He can't lift it? Are you tired of my questions
        yet? ;o)

        Any help would be appreciated.

        Thanks again,
        Chris

        On Jun 26, 11:07 am, "Mike Alsup" < [EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>> wrote:
        > IE has a powerful script debugger, but you have to enable it.
        > Details can be found here:
        >
        > http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx
        <http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx>
        >
        > Mike
        >
        > > I've got a bit of a problem where by I get a JavaScript
        syntax error in
        > > IE6, but everything works fine (no errors show in firebug)
        in FF 2.0.0.4 <http://2.0.0.4>.



-- http://www.cjordan.us



--
http://www.cjordan.us

Reply via email to