Skip to content

Instantly share code, notes, and snippets.

@sranso
Created November 26, 2014 20:44
Show Gist options
  • Save sranso/9f6f93cd794c7cd3475e to your computer and use it in GitHub Desktop.
Save sranso/9f6f93cd794c7cd3475e to your computer and use it in GitHub Desktop.

#debugging node apps

##how to debug node apps w/ node inspector

  • Watch Expression in inspector -- will keep track of the val of something
  • Call Stack then right-click on callbacks you can Restart Frame
  • can edit vars in Scope Variables
  • can live edit source code in debugger
    • an asterisk will appear above file name, command s will save that code
  • debugging mocha unit tests
    • node-debug -s ./node_modles/.bin/_mocha (the -s will stop at first line of code)
  • breakpoints
    • add debugger; into source code
    • set breakpoints in inspector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment