Fork me on GitHub

jQuery-inlog

jQuery-inlog allows you to easily debug your jQuery code. See exactly what you pass to functions, what they return and in which context (this-value) they were executed.

NEW: See nested or recursive calls in the right order. Wooot.

Without changing any of your code! I call it black-box magic. Or short: black magic. Or even shorter: js

The original idea came from https://github.com/fmsf/jQueryLog, which was a modified version of the jQuery core rather than a plugin at the time I started with jQuery-inlog.

tl;dr Example

For those of you who can't wait or don't want to read the example.

  1. Open the Firebug console (hint: F12)
  2. Press this button
  3. The following code will then be run

Example

Some random example with demo code

The markup

The jQuery code

The magic on your console (default settings)

Console output with default settings

Verbose magic {maxDepth: -1}

The last branch was expanded to see how much is getting logged

Console output with maxDepth of -1

More verbose magic {maxDepth: -1, thisValue: true}

Console output with maxDepth of -1 and this-value enabled

Hardcore raw magic {rawOutput: true}

Console output with raw-output enabled

Documentation / Reference

Include jquery.inlog.js after jQuery core and enable it by calling $.inlog(true) or $.inlog(options).

It's best practice to include $.inlog(false); right after the part you want to inspect.

Options

You can call $.inlog(options) any time to change options. Available options: