Skip to content

Instantly share code, notes, and snippets.

@tastycode
Created May 27, 2015 17:33
Show Gist options
  • Save tastycode/f66785f3915772b274ef to your computer and use it in GitHub Desktop.
Save tastycode/f66785f3915772b274ef to your computer and use it in GitHub Desktop.
Find misplaced console.logs
> var ConsoleLogOld = console.log;
undefined
> console.log = function() {
... ConsoleLogOld.apply(null, Array.prototype.slice.apply(arguments))
... console.trace()
... }
[Function]
> console.log("meow")
/*
meow
Trace
at Console.console.log (repl:3:9)
at repl:1:10
at REPLServer.self.eval (repl.js:110:21)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
at Interface._line (readline.js:531:8)
at Interface._ttyWrite (readline.js:760:14)
at ReadStream.onkeypress (readline.js:99:10)
at ReadStream.emit (events.js:98:17)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment