File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Joined: Mar 22, 2005
Posts: 39551
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 - updated with new look and Ping home screen widget
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

Joined: Oct 14, 2009
Posts: 21

Firebug is your friend.

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

Joined: Mar 22, 2005
Posts: 39551
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

Joined: Nov 08, 2001
Posts: 15376
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.

I agree. Here's the link:
subject: Best Tool For debugging Javascript
Similar Threads
Try - Catch Exception
registerDriver() Failed:
How to Use the ANT tool in JBoss2.2.5 Application server
struts-config parsing error-help
unable to delete or rename old file