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

VS Code attach to shared process does not work with node2 type #14434

Closed
sandy081 opened this issue Oct 25, 2016 · 8 comments
Closed

VS Code attach to shared process does not work with node2 type #14434

sandy081 opened this issue Oct 25, 2016 · 8 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@sandy081
Copy link
Member

Testing #14341

  • VSCode Version: Latest Insiders
  • OS Version: Mac OS

Steps to Reproduce:

  1. Set up VS Code development workspace
  2. Launch vs code dev using ./scripts/code.sh
  3. Configure the shared process launch to use node2 type
  4. Start the launch

It fails

@sandy081 sandy081 added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 25, 2016
@roblourens
Copy link
Member

How do you configure the shared process launch to use node2? Is it an Electron renderer process? If so it won't work because of microsoft/vscode-node-debug2#4.

@sandy081
Copy link
Member Author

@roblourens It is not a renderer process.. It is a node process. I just changed type from node to node2.

@roblourens
Copy link
Member

In the launch config though? That's an attach config, so where does it get started in debug mode?

@roblourens
Copy link
Member

Oh right node-debug can put running processes into debug mode, but node2 can't. microsoft/vscode-node-debug2#15 - so, can't support this unless you can get it to start up in debug mode somehow.

@weinand
Copy link
Contributor

weinand commented Oct 25, 2016

@roblourens I suspect that the 'code.sh' script configures VS Code to launch the shared process with '--debug'. This prevents node-debug2 from connecting successfully because it needs the '--inspect' flag. The nodejs/node#8464 approach is not used here.

@roblourens
Copy link
Member

Oh I see this - https://github.com/Microsoft/vscode/blob/master/src/vs/code/node/sharedProcess.ts#L35 but, there's no way to know ahead of time whether someone will want to attach with node or node2. Maybe at some point we want to switch it to --inspect. I don't know who uses it and cares one way or the other.

@weinand
Copy link
Contributor

weinand commented Oct 25, 2016

The shared process runs on Electron's node. Does this already support '--inspect'?
Is it possible to launch node with both '--debug' and '--inspect' and decide later what debugger protocol to use?

@roblourens
Copy link
Member

I guess I'm not sure whether it will have the same problem as forking a renderer process with --inspect. It's not possible to use both though, you can only pick one.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

3 participants