atom-node-debugger icon indicating copy to clipboard operation
atom-node-debugger copied to clipboard

Connect to existing node-process.

Open bjackson opened this issue 10 years ago • 35 comments
trafficstars

It would be useful to connect to an already running node-process.

bjackson avatar Feb 11 '15 22:02 bjackson

Is this possible?

hfossli avatar Jul 02 '15 09:07 hfossli

@hfossli it's possible also doable. I'll try to find out some time to implement it.

kiddkai avatar Jul 02 '15 11:07 kiddkai

Would be awesome! 🎶

We've embedd our node server in a mac app and starting the node server with NSTask. It would be great to attach this debugger !

hfossli avatar Jul 04 '15 14:07 hfossli

:+1:

glachowski avatar Jul 09 '15 08:07 glachowski

+1

maxnowack avatar Jul 13 '15 13:07 maxnowack

+1

crazyquark avatar Jul 16 '15 15:07 crazyquark

+1

pcan avatar Jul 31 '15 09:07 pcan

+1

SC7639 avatar Sep 17 '15 15:09 SC7639

+1

Any chance you could look into this sometime soon? It would be really helpful to debug express apps, as I current cannot seem to do that from within Atom using this plugin.

adamreisnz avatar Nov 16 '15 00:11 adamreisnz

It seems to be one of the mostly requested features so it is definitely a candidate.

codecontemplator avatar Nov 17 '15 09:11 codecontemplator

+1

mhaamann avatar Nov 23 '15 20:11 mhaamann

+1

strarsis avatar Nov 24 '15 21:11 strarsis

This would be really useful for Meteor apps too.

0xn3bs avatar Dec 02 '15 16:12 0xn3bs

+1

lpaulger avatar Dec 07 '15 10:12 lpaulger

+1

jeffmhastings avatar Dec 11 '15 15:12 jeffmhastings

+1 !

gelenbaas avatar Dec 23 '15 19:12 gelenbaas

Any tips to where I should start if I were to implement this?

hfossli avatar Dec 24 '15 01:12 hfossli

Is it possible to have it debug a local file but listen to a remotely running instance? i.e. I'd like to debug a project I run in a Vagrant environment.

mikidep avatar Jan 15 '16 16:01 mikidep

+1

kabo avatar Jan 23 '16 17:01 kabo

+1

pewh avatar Feb 01 '16 06:02 pewh

+1

jschuur avatar Feb 03 '16 16:02 jschuur

+1

codyhazelwood avatar Feb 17 '16 22:02 codyhazelwood

Thanks for your patience. Made an attempt to implement this in the latest release. Feel free to check it out.

codecontemplator avatar Feb 18 '16 20:02 codecontemplator

Great, thank you. Will definitely try it out.

On Fri, Feb 19, 2016, 09:34 Daniel Brännström [email protected] wrote:

Closed #23 https://github.com/kiddkai/atom-node-debugger/issues/23.

— Reply to this email directly or view it on GitHub https://github.com/kiddkai/atom-node-debugger/issues/23#event-555655901.

adamreisnz avatar Feb 18 '16 20:02 adamreisnz

Sorry, but what is the command to attach to an external process? After updating the package in Atom to 1.4.1 the option to attach is no longer present (as described here https://github.com/kiddkai/atom-node-debugger#attaching-to-external-processes)

adamreisnz avatar Feb 18 '16 21:02 adamreisnz

Lets keep this open for feedback.

codecontemplator avatar Feb 20 '16 15:02 codecontemplator

@adambuczynski I added the attach command to the menu as well now. No keyboard shortcut by default though

codecontemplator avatar Feb 20 '16 17:02 codecontemplator

Thanks, that's fine

adamreisnz avatar Feb 21 '16 06:02 adamreisnz

Works great! Thanks, this is super useful.

kmctown avatar Mar 08 '16 17:03 kmctown

This does not seem to work very well for me in my Express app. I run the app using node --debug=5858 --es_staging --harmony_destructuring scripts/server.js and then in Atom I try to connect with Node debugger.

If the app doesn't run, I get the following messages:

Connection attempt 3 to node process on localhost:5858 failed. Will try again in 500.

This is fine, since the app is not running. Then, after starting the app, the messages stop, and I get a message that Node debugger has connected. So far all good.

But then when I test throwing errors, no output whatsoever shows up in the Node debugger console panel. Nor do I see anything under the call stack etc.

If I introduce a debugger; statement in the code, the application breaks on it, but no feedback is shown in Node debugger. However, pressing resume does actually step over the debugger; breakpoint and continues app execution.

So it seems to work partially, but without output being generated it's not very useful at the moment, at least not for this particular app I'm working on. Any thoughts on what could be going on?

adamreisnz avatar Mar 08 '16 19:03 adamreisnz

Hello, Is there a way to map my project folder to the app path on the server ?

I would like to debug the code in my working folder, but the debugger downloads a copy for me.

The problem is that my app runs inside a docker container that have my working folder mapped to a volume inside the container that has another path.

I know that the code is exactly the same, but in the server being debugged the code lie in another path.

That would be specially helpful to set the breakpoints, because the server think that they are located in another sources files and the execution do not stop on them.

yucerjs avatar Mar 10 '16 23:03 yucerjs

@yucerjs I do not think that is possible. I suggest you open a separate issue for that. Does that make sense? Cheers

codecontemplator avatar Mar 13 '16 21:03 codecontemplator

@adambuczynski When the debugger is attached to an external process it will not capture stdout/stderr. That does not explain why the callstack is empty though...

codecontemplator avatar Mar 13 '16 21:03 codecontemplator

@codecontemplator is it not possible for it to capture stdout/stderr?

adamreisnz avatar Mar 13 '16 22:03 adamreisnz

Trying it out right now, node running in Vagrant VM, if I attach a green message gives me some positive feedback, but no reaction whatsoever is given on breakpoints. Also if I try to attach while node is down it just does nothing. No error, no warning, it just opens the widget at the bottom.

mikidep avatar Apr 15 '16 10:04 mikidep