Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Start inner server with debug enabled #412

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants
Contributor

jwulf commented Oct 21, 2012

This patch adds support for node-inspector debugging of Meteor apps.

It adds --debug and --debug_brk as options for meteor run.

The options are passed from meteor.js to global variables in run.js via bundle_options. Not sure if that is the right way to do it, but it seemed like the least intrusive mechanism.

In run.js the inner server is then started in plain vanilla, debug or debug-brk mode, depending on command line option (if any) specified.

Then node-inspector can be started, and it will attach to the inner server.

Contributor

75lb commented Oct 25, 2012

oops, i didn't notice this.. i just submitted a PR to add the same feature..

@glasser glasser referenced this pull request Nov 1, 2012

Closed

Server-side debugging #420

Owner

glasser commented Nov 1, 2012

See also #420.

@sixolet sixolet pushed a commit that referenced this pull request Dec 3, 2012

Naomi Seyfer Merging pull request #412 from jwulf
With some additional edits
682a883
Contributor

sixolet commented Dec 3, 2012

I added the --debug and --debug-brk options to meteor run, based off your pull request. I did take the liberty of changing the underscore to a dash, to match node's behavior :)

@sixolet sixolet closed this Dec 3, 2012

@haircuttedfreak haircuttedfreak pushed a commit to tastemade/meteor that referenced this pull request Jan 13, 2013

Naomi Seyfer Merging pull request #412 from jwulf
With some additional edits
1500c9e

segrey commented Feb 14, 2013

When will this fix be included in curl https://install.meteor.com | /bin/sh?
Or maybe it's available now? If yes, how should I start meteor in run mode to be able to debug server side code?
Thanks.

Owner

glasser commented Feb 14, 2013

We ended up reverting that and (as of 0.5.3) just allowing you to set a $NODE_OPTIONS environment variable, which you can put '--debug' or '--debug-brk' or whatever into.

segrey commented Feb 14, 2013

Thanks. It works as expected.

Contributor

dandv commented Apr 8, 2014

Just a note that deployed apps don't take into account $NODE_OPTIONS, and you should pass --debug to node. This becomes trickier if you use forever, pm2 or some other monitor/runnner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment