How can I debug Meteor server-side code running on remote server, Meteor 1.3.2.4?

I’ve just been through a dizzying number of SO and other posts about Meteor debugging.

I’m trying to debug some server-side code that sends push notifications (one day) to my Android device.

Breakpoints would make me ecstatic but even seeing console.log()s would be worth a minor celebration at this point.

Ideally I’d like to be in Chrome Development Tools. Second choice might be something like the youtube video I just watched for Webstorm (but I’m told Webstorm no longer works with Meteor). Third choice would be at least getting console.log() to some terminal window.

My environment:
Ubuntu 14.04 for local dev and on my Digital Ocean staging server
on server:
npm version
{ npm: ‘3.8.9’,
ares: ‘1.10.1-DEV’,
http_parser: ‘2.7.0’,
icu: ‘57.1’,
modules: ‘48’,
node: ‘6.2.0’,
openssl: ‘1.0.2h’,
uv: ‘1.9.1’,
v8: ‘5.0.71.47’,
zlib: ‘1.2.8’ }
Node Inspector v0.12.8
nvm 0.31.1
3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I’m deploying with mupx.

I’ve tried “mupx stop”, then going to the server and running many variations on “node --debug main.js”.
At some point I hit this issue which seems to conclude that node-inspector “is not ready for primetime”. https://github.com/node-inspector/node-inspector/issues/873
It’s recommended in this thread to try devtool but it’s not at all clear to me that devtool can be used to debug my remote server.
https://mattdesl.svbtle.com/debugging-nodejs-in-chrome-devtools

Of course I’ve read the @joshowens post many times.
I read that Webstorm is good but I’ve read more recent posts that say that Webstorm doesn’t work since Meteor 1.2.
(btw, my preferred IDE is sublime but I’m willing to try anything. ANYTHING at this point).

Sounds like you want to debug a production app. I’m not sure meteor shell is available with mupx (if so, that’d probably be the first thing to look at)
Have you tried mupx logs --tail=500 -f ? I’m not 100% sure it works since I’m using https://github.com/kadirahq/meteor-up and the command is mup logs --tail=500 -f

@gsabran Oh right I sort of forgot that one in fact–thanks! I got sort of lost digging around the net. That does at least get me the console.logs(), you’re right.

I still wonder then if there is anything out there that can do breakpoints, or short of that even, a Chrome Dev Tools-like console output so I could do things like output a hierarchical object and drill down.(?)

Maybe I’ll try out Webstorm to see for myself. For now I will use mupx logs though. Any other tips out there I’m all ears.

Yup, I’d love to have any other tips. I’m currently using console.log on the server and looking at the outputs.

Much as I can’t stand to use proprietary software, I did go so far as to download the 30-day trial of Webstorm ($129 / year to buy). I also don’t like bloated behemoth java IDE’s in general (ex Netbeans user) but I can always keep Sublime for most coding/editing.

I haven’t had time to figure out remote debugging with it yet but supposedly it can do it (with node even? we’ll find out).

But just being able to set breakpoints on both client and server Meteor code is pretty huge. Already in just 2-3 hours playing with it it gave me some interesting insights. And I do have another friend who swears by it, for other reasons (find anything even beyond what sublime’s find anything does, etc.)