Javascript logo

debug javascript

home | software | javascripts | debug javascript

Unlike programming languages that have console output or IDE debug traces, Javascript can be complex to debug. The Firebug utility in Firefox is helpful, though sometimes not enough. Filling your code with 'alert(...)' methods interrupts the program's execution and can be unusable in repetitive loops.

To enable debug output, place this in your page:

<script type="text/javascript"> enableDebug(); </script>

Alternatively, call this method from elsewhere in your Javascript code.

Other methods you can call are:

Debugging is enabled on this page. Try it out:



the code

debug.js - right-click and choose save as