SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    firefox: javascript debugger?

    Hi,

    I just switched to firefox this week, and I downloaded the latest version, and I'm looking for a javascript debugger similar to the one I had for ie6. I did a search and one thread said a javascript debugger comes with firefox. I can't seem to locate it. Where is it, and is there a site that explains how to use it?

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::: certified wild guess :::

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Get it as a firefox extension here:

    https://update.mozilla.org/extension...id=216&vid=512

    And the official page is here:

    http://www.hacksrus.com/~ginda/venkman/

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I downloaded Venkman successfully and went to work on that debugger tutorial, but I can't get it to step through the example scripts. AND, now I discover that the download has completely messed up my right click menu. I can't paste what I had written about the problems I am having into this post--there's no "paste" option anymore. I had to switch back to IE6 for my right click menu to give me a paste option, and then I could paste the details of the problems I am having(below). Why the heck would Firefox/Henkman do that? I even closed the debugger and closed all the Firefox windows and reopened a new Firefox window, but I still couldn't paste anything in here.

    From an IE6 browser window:

    I'm trying to do an example in the Javascript debugger tutorial here(page 3 "Basic Debugging"):
    http://www.svendtofte.com/code/learn...man/basics.php

    Here is the script:

    Code:
     
    3) <script>
    4) var a = 1;
     
    5) function test(a) {
    6)	 var t = "passed : ";
    7)	 return t + a;
    8) }
     
    9) var b = test(a);
    10) document.write("<p>" + b + "</p>");
    11) </script>
    I clicked the Stop button in the debugger and reloaded the script, and Line 4 was highlighted in yellow(the tutorial says it should be line 3). I typed 'a' into the Interactive Session input line, and hit return. I got an error message sayng 'a' was not defined. So far, so good.

    I clicked on Step Into and then line 5 was highlighted. I typed 'a' into the Interactive Session input line again, and hit return. I got this:

    < 001: a
    >$[0] = [void] void

    The tutorial says I should get a value of 1 for a. That doesn't appear to be giving me a value of 1 for a.

    Next, I clicked Step Into again, and line 9) was highlighed in yellow. I typed in 'a' again just to see what would happen, and I got the same thing:

    < 0001: a
    >$[0] = [void] void

    Once again, it doesn't appear that's a value of 1 for a. I typed in 'b', and as expected I got an error saying b was not defined. Then, I typed in 'test(a)'. The tutorial says I should've got:

    passed : 1

    for test(a). But, I got:

    <0001: test(a)
    > $[1] = [string] "passed : undefined"

    What the heck is going on?

    I clicked Step Into again and it jumped up to line 4). Huh? Why not line 5)?
    I entered 'a' in again, and this is what I got again:

    < 0001: a
    >$[0] = [void] void

    I clicked Step Into again and advanced to line 5). I typed 'a' in again:

    <0001: a
    >$[0] = [integer] 1

    Finally!! A value of 1 for 'a'. Can anyone explain this debugger's behavior? Why no value for 'a' sooner?

    Then, when I click Step Into successively after that, this is what happens:

    line 9)
    line 6)
    line 7)
    line 9)
    line 10)

    It just doesn't seem to make sense. The whole sequence is:

    4)
    5)
    9)

    4)
    5)
    9)

    6)
    7)
    9)
    10)
    Last edited by 7stud; Sep 20, 2004 at 15:07.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •