0

Is there any way to set breakpoints and step through meteor server code? I'm not a fan of sticking a bunch of logging etc into the server code. I'd much prefer to use breakpoints. My IDE of choice is IntelliJ, I'd really like to do it in there if possible.

Ben
  • 16,124
  • 22
  • 77
  • 122

2 Answers2

1

Have you tried node-inspector? It works great. I don't have much time here on hand, so refer to this meteor-faq:

https://github.com/oortcloud/unofficial-meteor-faq#how-do-i-debug-my-meteor-app

Also here: http://www.meteorpedia.com/read/Debugging (same thing, i.e use node-inspector).

https://github.com/node-inspector/node-inspector

bitspook
  • 649
  • 7
  • 19
  • Slava Kim also created a couple of videos to illustrate how to debug Meteor: https://youtube.com/playlist?list=PLT26u8Zi9MwRxuLMbgmV3NP0szUlo7B0l – StephenD Jul 14 '14 at 07:03
0

You can find an answer to your question here: How to debug server side code in a Meteor app

First you have to install node-inspector

npm install -g node-inspector

and then run the Meteor app with a specific variable

env NODE_OPTIONS="--debug" meteor

in new terminal tab open the node-inspector by run the command

node-inspector

copy and paste the url from node-inspector on Chrome and you will find all the server side code to set breakpoints for debug. Important: Set the breakpoints on your project's files at the (no domain) folder

Community
  • 1
  • 1
mstamos
  • 111
  • 1
  • 3