-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Start new debug sessions from within debugger #116730
Comments
@connor4312 this feature request seems to be related to what you are doing in js-debug. |
Interesting the DBGP protocol is 'push only' for session instantiation. I think this makes sense, right now js-debug needs to call js-debug has a separate bundle for VS that makes a custom DAP request to trigger a child session, and nvim-dap had trouble trying to set it up because of the need for special child-session logic. Adding a protocol-level feature would make js-debug more reusable. |
Thanks for the hints. As far as I understand the behavior could be achieved by having two parts in the implementation:
So when a "listen" (we'd probably abuse "attach") type of debug session would be started
This way we end up with two sessions. One responsible for listening, another for the active active connection. My question is, will passing the parentSession like this Now, if there were a simpler option, even better :) Thanks! |
Your proposed approach is very similar to what the JavaScript debugger does. As far as I know any given extension can be activated in at most one extension host, so that would work. |
@zobo please note that We should try to come up with a proposal for a language-neutral DAP addition (and we probably should move the discussion to debug-adapter.protocol). |
Hi @weinand. I understand, the question was specific to vscode and so I use the term DAP in this context, as you pointed out. |
Hello @connor4312. What I do is:
As long as I am developing the debug adapter and it's running in one debuggable processes and vscode connects to it via Is there any way to request vscode to reuse the adapter process? Thanks! |
Ok, I should have just RTFM: https://code.visualstudio.com/api/extension-guides/debugger-extension. Doc here explains how using |
@zobo yes, the |
Let's merge this into microsoft/debug-adapter-protocol#79. Adoption in VS Code can be tracked in #160169. |
Hello. I currently do feature development on the PHP debugger https://github.com/xdebug/vscode-php-debug and have the following question/request.
The DBGP debug protocol that is used to debug languages like PHP, Python, AutoHotkey has a "connect back" concept where the DEBUGGER LISTENS and the DEBUGEE CONNECTS to it. In a typical PHP setup it could, and usually does mean, that for each page-load the PHP runtime makes a connection to the debugger.
The debugger should offer the user a separate debug session for each connection received.
What we are currently doing is that we present these individual debugee connections as threads in the currently running debug session.
Currently each debug session must be initiated form vscode side. Is there a way it could be achieved that when the extension receives a valid DBGP debug connection it somehow starts a new DebugSession and passes the connected socket over to that one?
Thank you.
The text was updated successfully, but these errors were encountered: