Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug node-webkit/nwjs application #212

Closed
awn70 opened this issue Jun 17, 2015 · 3 comments
Closed

Debug node-webkit/nwjs application #212

awn70 opened this issue Jun 17, 2015 · 3 comments

Comments

@awn70
Copy link

awn70 commented Jun 17, 2015

Hi,
is it possible to debug the code running in the node part of a node-webkit (nwjs) application?
(Attach the remote debugger etc.?)
Regards
Andreas

@mousetraps
Copy link
Contributor

Haven't personally tried NW.js, but there's no reason it shouldn't work, so let us know if you run into any issues.

Here are a few resources to help get you started:

@awn70
Copy link
Author

awn70 commented Jun 18, 2015

I can see the node process in the "attach to process" window, but when I try to attach Visual studio shows a message box with a timeout error.
This is what I've done:

  1. Changed current directory to my nwjs project
  2. Started the app with: C:\nwjs-v0.12.2-win-ia32\nw.exe --remote-debugging-port=9222 "."
    (tcpview shows nw.exe listening on port 9222)
  3. Opened attach to process window in Visual Studio, entered "Transport: Node.js remote debugging", "Qualifier: tcp://localhost:9222/#ping=0", and hit refresh
  4. Selected the node.exe entry in the list and hit attach
    (Message box appears with something like "attaching not possible, timeout", but tcpview shows established connections to Visual Studio.)

@billti billti added this to the Future milestone Aug 21, 2015
@mjbvz
Copy link
Contributor

mjbvz commented Jun 27, 2016

I believe that Nw.js is using the Chrome debug protocol, not the v8/Node debug protocol that we currently support, and that's why attachment fails.

With the Chrome debug protocol having now landed in Node proper, and the V8 debug protocol deprecated, we do plan on adding support for the Chrome debug protocol as part of a larger debugging effort sometime in the future.

@mjbvz mjbvz closed this as completed Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants