Created
November 24, 2014 23:32
-
-
Save davidbanham/51ca172b3b660ecbabb7 to your computer and use it in GitHub Desktop.
NodeJS debugger + repl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To interact with this file, run `node debug repl.js` | |
// If you type `next` it will step to the next line | |
// If you type `cont` it will carry on to the | |
var foo = 'bar'; // You are stopped here. To go to the next line, type `next` | |
var bar = 'baz'; // Now you're here! Typing `next` was a lot of keystrokes, you can also type `n` | |
var baz = 'quux'; // This is still going to take a while. To skip all the way to the next debugger statment, type `cont` | |
var alice = 'bob'; | |
var bob = 'alice'; | |
debugger; // Check it out! We went all the way here. Now drop into a REPL by typing `repl`. You can save its state with `.save output.js` and exit it with ctrl+C | |
var lol = 'hai'; | |
debugger; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment