Results 1 to 8 of 8
  1. #1
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Debugging in JavaScript

    How does one debug in Javascript? Is it possible to have a VB-like interactive debugging?

    Often, when I have an error, I have the message "do you want to debug?". But no matter what I do, I cannot seem to get the de###### working.

    Maybe this is just a case of <img src=/S/rtfm.gif border=0 alt=rtfm width=24 height=23>?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Netscape has a very basic de###### built in. When the taskbar indicates a JavaScript error, type java script: into the location box to bring up the de######. Make sure you include the colon ( : ), or you will end up viewing www.javascript.com instead.

    Netscape also provides a more robust version for download. I don't have the address handy, but try <A target="_blank" HREF=http://developer.netscape.com>http://developer.netscape.com</A>.

    There was an article at WebReview (<A target="_blank" HREF=http://www.webreview.com>http://www.webreview.com</A>) that showed how to build your own.

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Sorry, I should have specified.

    I'm developing for our corporate Intranet, IE5.5
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Geoff,

    Doesn't matter what browser you normally use. If you want a free de###### that works, install a copy of Netscape, too.

    I used to have a copy of IE on my computer just for testing web sites I was developing. I never used IE in any other way. None the less, I installed it just for testing web sites. You may want to take a correlary step and install Netscape just for JS debugging.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Arthur,

    I've got a lot of highly-ie dependant stuff at the moment- including some that doesn't work below 5.5. Wouldn't that be a problem?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #6
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles, California, USA
    Posts
    1,734
    Thanks
    0
    Thanked 3 Times in 1 Post

    Re: Debugging in JavaScript

    Actually IE 5.5 has a primitive de###### built in. If you click on the error icon down in the task bar it'll give you *some* idea of what went wrong.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Eileen_sig.gif>

  7. #7
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Eileen,

    I Couldn't see an error icon on my toolbar.

    I did find out some more debugging info though.

    Microsoft does have a <A target="_blank" HREF=http://msdn.microsoft.com/scripting/default.htm?/scripting/de######/dbdown.htm>debugging download</A>.

    Curiously enough, I couldn't find that link within the Scripting De###### site directly. It was only linking by a <A target="_blank" HREF=http://www.devguru.com/features/tutorials/msd/MSD_Tutorial.html>Script De###### Tutorial</A> that I could find the link.

    I have since noticed- that the editor pointed to in <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=htm&Number=44098&page=0 &view=expanded&sb=5&o=0#Post44098>FatherJack's post</A> in this forum has a de######. I don't know if it was there before, or if it was activated by the download. But that allows me to set breakpoints, exmaine variables, and a few nice bits like that. But I did have to use it differently than I had previously. I had gotten into the habit of just viewing via the "quick view". It turns out that I have to save, and then Run. (I can run without saving- but it only runs the last saved version. Quite confusing at first).

    Thanks for your input.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debugging in JavaScript

    Geoff,

    I was going to say, "maybe yes, maybe no" to the IE specific stuff, in that you could probably use Netscape to debug the JavaScript even if some of the page elements didn't render properly. This would not work if the IE specific stuff was MS specific JScript and not JavaScript.

    Anyway, it looks like you found what you needed without this. Good luck.

Posting Permissions

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