PDA

View Full Version : debugging - which 'line' is it?



Elsi
Jul 1st, 2002, 01:53 AM
OK -- I'm working on a script. IE5.5 tells me 'error in line 66, object expected'. Problem is that I've modified my source so that line 66 is a comment & it's still failing. That tells me that my line number counting isn't the same as the browser's. Any idea how I can get to the right line to debug this sucker?

TrueLies
Jul 1st, 2002, 02:33 AM
post a few lines of the code around the pointed 66th line. If it tells you at that line there is an error, odds are there is indeed, maybe even a silly one that one may easily overlook you know!

ciao

Elsi
Jul 1st, 2002, 07:52 AM
That's what I eventually did. By the way, I was counting each line in the source and discovered that IE didn't count 2 lines for a simple 'IF' statement:


if ( test == "a" )
numL = 0

Once I found which line it was complaining about, finding the syntax error was relatively easy. My documentation was out of date -- there was no isNum(x) function; I had to use isNaN(x).

Thanks for replying.

Elsi

RadarBob
Jul 1st, 2002, 02:04 PM
Originally posted by Elsi
OK -- I'm working on a script. IE5.5 tells me 'error in line 66, object expected'. ]

The reference to "line 66" is the page as currently being displayed. It is not the same line 66 of the unexecuted source code.

ASP did it's thing then sent it to your browser. Because many lines of the source were resolved into HTML, the source and the displayed page are different. "View Source" from the browser and you will see the offending line 66.