Permalink
Browse files

Merge pull request #46 from joddie/inspect

Add inspect() function to the repl for async debugging
  • Loading branch information...
2 parents c073cfb + 57dbb72 commit dff3192c6962ad5bdac176051dae5a928fb3f494 @jonnay jonnay committed Oct 13, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 swank-handler.js
View
@@ -306,8 +306,17 @@ function DefaultRemote () {
this.context._swank = {
output: function output (arg) {
self.output(arg);
+ },
+
+ inspect: function inspect () {
+ Array.prototype.forEach.call(arguments, function (arg) {
+ self.output(util.inspect(arg, false, 10));
+ self.output('\n');
+ });
}
+
};
+ this.context.inspect = this.context._swank.inspect;
}
util.inherits(DefaultRemote, Remote);

0 comments on commit dff3192

Please sign in to comment.