Server side debuggin on 1.4.2

I’ve spent many hours researching and still can’t figure it out, is there any way to debug server side code? That’s so frustrating, I’m seriously thinking of switching from meteor to something else :frowning:

1 Like

Hm, no solution…?
Surely there should be some

@joshowens did a cool overview on this a while ago http://joshowens.me/easily-debugging-meteor-js/

Webstorm also has a debugging option, which was really cool when I last tried it (which has been 10 month ago or so)

and another resource http://meteorpedia.com/read/Debugging

Hi, thanks for reply. The problem is that with the current version none of these methods actually work… Is anyone really
able to debug v1.4 nowadays?

Yeah I did a quick try of running meteor debug and got an websockets-disconnected-error when opening the debugging-console… strange stuff…

So I did:

meteor npm install -g node-inspector
meteor --debug-port 8080

and then browsed to http://localhost:10302/?port=8080 as instructed by the build process and began debugging.

The only issue I found was with Chrome itself (https://maltronic.io/2016/12/01/node-inspector-console-not-working-in-latest-version-of-google-chrome/), which required me to patch DOMExtension.js as instructed.

Somehow I also have this error from time to time

The only time I’ve seen that is when the node-inspector process was still running from a prior debug session. It may be worth doing a ps -ef|grep node and kill -9 pid if you find one. I’m not sure why it gets left behind sometimes, as it’s usually fine.

1 Like

Hi Rob
That’s very nice of you to give these detailed replies, they really helped me, though indirectly. I had tried before starting Meteor like you proposed, but the inspector was always empty. Now I firstly noticed that Meteor on my setup doesn’t generate source maps straight away after building or maybe node-inspector doesn’t catch them after loading. Secondly I noticed that if I wait for some few minutes (maybe two) then magically node-inspector starts showing sources and actually (!) works. The same behaviour with source maps I experience in front-end debugger (chrome dev tools in my case).
Tried on an empty project - node-inspector catches sources immediately.
Thanks again

2 Likes