Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2004
    Thanked 0 Times in 0 Posts

    tips on debugging JavaScript errors


    I am new to JavaScript.
    I am using IE6.

    Every now and then I get JavaScript errors in my pages and I find it very difficult to find the location of the error.

    I get a message saying that the error is in file: x.php on line 5, where in fact the error turns out to be in test.js on line 20!
    of course I include test.js in x.php but IE doesn't know how to give the right file and line for the error!

    Is there a simple and preferred way to debug such errors and get to the right file and line?


  • #2
    Join Date
    Sep 2003
    Thanked 0 Times in 0 Posts
    Since you are using IE, have you tried using the Microsoft Script Debugger?
    It's a little better in that it will open a popup with the line the error appears on highlighted. But, it still takes some experience to read and properly decipher the cryptic error message.

    However, I'm sure most of the other programmers here will agree that if you need to debug a script, you should use a Mozilla based browser (I use Firefox) and the javascript console which returns much better error reports....


  • #3


    Posting Permissions

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