Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
debug.js is an in-browser JavaScript error-reporter
branch: master
Failed to load latest commit information. Modified README
debug.js Modified header comment
demo.html new version of debug.js


© James Padolsey

debug.js is an in-browser JavaScript error-reporter.

  • Runs your JavaScript through [JSLint](] and shows any emerging errors.
  • Runs your JavaScript through the browser and provides feedback on runtime errors.

debug.js is not really a debugger but of great aid in the debugging process. It's not meant as a replacement for current debugging tools (such as Firebug) but more as another tool you can use to ensure that your JavaScript is "up to the mark".

Note: This is still in development; bugs expected!


Download debug.js and include it in your document, right at the bottom:

<script src="debug.js"></script>

If no errors (syntax or runtime) exist then you won't see anything. If errors do exist then an overlay should appear which details the errors encountered.


        <title>DEBUG DEMO</title>

        <!--JSLint Example-->
            var regex = /ProblemWithThisRegex[123-]/

        <!--RuntimeError Example-->
            var something =;

        <script src="debug.js"></script>


Output produced from the above source:

debug.js preview


To skip a SCRIPT, simple preceed it with a comment containing just the word "skip":


To only skip the JSLint portion of the test preceed your SCRIPT with the following comment:


To give your SCRIPTS IDs, preceed them with comments like these: (note, don't use "skip" or "skiplint" as IDs!)

<!--foo bar-->


(A script's ID appears alongside its report - an especially useful feature if you have many...)

debug.js works with externally hosted JavaScript files too. The only type of file it cannot reach is one stored locally on a seperate domain to the document. For example: the documents URL is and the script is located at http://localhost/script.js - debug.js won't be able to reach this...

Something went wrong with that request. Please try again.