Does anyone know a good method for debugging server side code? I tried turning on Node.js debug and then using node-inspector, but it does not display my code.
I end up using console.log, but it is very inefficient.
Update: I found that the following procedure works on my Linux machine:
When you start Meteor, it will spawn two processes
process1: /usr/lib/meteor/bin/node/usr/lib/meteor/app/meteor/meteor.js
process2: /usr/lib/meteor/bin/node/home/paul/codes/bbtest_code/bbtest02/.meteor/local/build/main.js --keepalive
You need to send kill -s USR1 to process2
Run the node inspector and you will see the server code
From my first attempt, I modify the last line when running the meteor script in / usr / lib / meteor / bin / meteor to
exec "$DEV_BUNDLE/bin/node" $NODE_DEBUG "$METEOR" "$@"
and run NODE_DEBUG=--debug meteor on the command line. This only puts the -debug flag in process1, so I only see meteorite files in node -inpector and cannot find my code.
Can anyone check this out on a Windows and Mac computer?
debugging server-side meteor
user1416682 Jun 14 2018-12-12T00: 00Z
source share