Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add inspect() function to the repl for async debugging #46

merged 1 commit into from Oct 13, 2012


None yet
2 participants

joddie commented Jul 21, 2012

Debugging asynchronous node functions in a REPL is tricky when they take a callback but don't return a value to display immediately.

This patch adds an inspect function to the REPL which calls util.inspect() on each of its arguments and prints the results to the REPL output, so you can pass it as a callback to any asynchronous function. I put it in the _swank namespace and also bind it to inspect in the REPL's global context. This means it's quick to type, and if you overwrite it with some other value you can still get it from _swank.inspect.

jonnay added a commit that referenced this pull request Oct 13, 2012

Merge pull request #46 from joddie/inspect
Add inspect() function to the repl for async debugging

@jonnay jonnay merged commit dff3192 into swank-js:master Oct 13, 2012


jonnay commented Oct 13, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment