meteor Debugging Server Side Debugging with Node Inspector


Example

For server side debugging, you'll need to use a tool like Node Inspector. Before you get started, check out some of these useful tutorials.

HowToNode - Debugging with Node Inspector
Strongloop - Debugging Applications
Easily Debugging Meteor.js Walkthrough with Screenshots of Using Node Inspector with Meteor

tl;dr - there are a number of utilities in the Meteor ecosystem which are designed to be run at the same time as your Meteor application. They only work if your Meteor app is up and running and they can connect to a running website. meteor mongo, Robomongo, Nightwatch... these are all utilities that need your application to already be running. NodeInspector is one of these utilities.

# install node-inspector
terminal-a$  npm install -g node-inspector

# start meteor
terminal-a$  NODE_OPTIONS='--debug-brk --debug' mrt run

# alternatively, some people report this syntax being better
terminal-a$  sudo NODE_OPTIONS='--debug' ROOT_URL=http://myapp.com meteor --port 80

# launch node-inspector along side your running app
terminal-b$  node-inspector

# go to the URL given by node-inspector
http://localhost:8080/debug?port=5858