JavaScript jQuery.debug – A Simple Debugger

The jQuery.debug plugin is a simple but useful utility to dump variables visibly, directly within the HTML document. This allows you to track any variable any time, track values changed by events etc.

If the plugin is linked, a function jQuery.debug() can be used as the constructor of a single debugger. You may use simultaneously as many debuggers as you need. To use the debugger, you have to do two things:

  1. instatiate new debugger
  2. call its dump() method anywhere in your code
  3. more features may come in the future
// Example:

var debug = new jQuery.debug();
// ...
// ...

See plugin source code or the example and its source code for more details.

Download: version 1.0 (01/16/2009)

Published on 16 ledna, 2009 by pixy • Category: JavaScript

Tags: , ,

6 komentářů to “jQuery.debug – A Simple Debugger”

[1] by pk on 3. 2. 2009, 16:57

The example here cannot work, since the new statement is missing.

[2] by Petr Staníček on 3. 2. 2009, 17:15

I don't get it. „new“ is the JS keyword, and the example seems to work. In which browser it doesn't work?

[3] by pk on 3. 2. 2009, 17:27

I mean the example code in this article, 1. line. The linked example works well.

[4] by Petr Staníček on 3. 2. 2009, 22:32

Oh, yes! Thanks, fixing.

[5] by pk on 16. 2. 2009, 22:09

  1. the example in jquery.debug.js contains syntax error: posTo{...posTo:{....
  2. I don't really understand the principle, but many jq plugins use variable (variable?) jQuery instead of $. It has something with compatibility issues (jQ vs other frameworks). For example, now I tried to load jq.debug inside WordPress admin → firebug showed errors → mass replace $=>jQuery → works.

[6] by Petr Staníček on 16. 2. 2009, 23:03

[5] OK, you're right. I'm sorry, I'm so used to the ‚$‘-syntax so I didn't get this may be a problem. I fixed everything to the ‚jQuery‘-syntax. Thanks for the report.

Something serious to tell?

To comment, you have to login.