aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Best Tool For debugging Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Best Tool For debugging Javascript" Watch "Best Tool For debugging Javascript" New topic
Author

Best Tool For debugging Javascript

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I am having a problem with my page. Each time i press a button I always get an error on Line...

Please is there a tool thet one can use to debug this error.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Firebug is an excellent plugin for Firefox. But if you already have an error message, but don't know what to do with it, another tool may not help you. What is the error, and what is the code doing when it occurs?


Ping & DNS - my free Android networking tools app
Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
Actually we are using IE (Project requirement) and whenever i click a button i always get something like this





Looked at the source but can't locate the error


Niv Tyagi
Greenhorn

Joined: Oct 14, 2009
Posts: 21

Firebug is your friend. http://getfirebug.com/

you can debug JS via firebug. change CSS, edit html and what not.
I used firebug almost everyday/everyhour.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Well, nobody can tell you not to use Firefox to debug this issue (assuming that code doesn't make use of IE-only functionality).

Post the full code of the line where that error occurs. You may want to do an "alert(...)" on the intermediate objects (like "tempRows" and "cells") to make sure they are what you think they are.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
IE8 has a debugger built in.

'tempRows.cells[...].getElementsByTagName is null or not an object


That tells you exactly what is wrong, you are referencing something that does not exist. If you want to go old school, add alert statements and see what is going on there. I would guess that cells[x] is the wrong index.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best Tool For debugging Javascript