zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 280 forks source link

Node inspect (debugging) #1122

Closed Slind14 closed 4 years ago

Slind14 commented 4 years ago

Hi,

is there any way to set the node inspect command variable for debugging purposes with meteor up?

zodern commented 4 years ago

I plan to add this.

Slind14 commented 4 years ago

Is there a workaround for the time being?

zodern commented 4 years ago

There are two things that need to be done: 1) Get node to enable debugging after it is running. This can be done by sending a certain signal to the node process. You can use docker exec -it <container name> bash to access a bash shell in the container to do this from. 2) Attach the debugger to the node process, which requires accessing a port inside the docker container. You might be able to use app.docker.args option in your mup config to add a docker option to expose the additional port.

Slind14 commented 4 years ago

hmm, the issue there is that enabling debug mode via. the kill usr1 command opens a port on localhost only which we can't expose with docker.

Slind14 commented 4 years ago

I create a local tunnel within the container as a workaround. A mup feature would be very very helpful

zodern commented 4 years ago

This is in the latest 1.5 beta. You can try it with npm i -g mup@next and run mup meteor debug.

Slind14 commented 4 years ago

thank you. Is there any chance this could be merged? https://github.com/zodern/meteor-up/pull/1120

I have to fix this manually every time.