If you have the newest version of Mozilla you can utilize a tool called Venkman. It is a Mozilla extension that provides a full blown debugger environment with variable monitoring, break points and many other features seen in debuggers from other languages.
Venkman in conjunction with Mozilla isn’t really a complete IDE like Visual Basic or Delphi, but it’s as close as it gets. if you’re curious and want to try Venkman go to the Venkman project home page and also try a Google search for “using venkman.” You’ll find all the information you need to get started.
From the Venkman’s Project Home Page:
The Venkman Development Home Page maintained by Robert Ginda This page contains the latest Venkman news and development releases.