-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat: multi session debugging #517
Open
zobo
wants to merge
8
commits into
main
Choose a base branch
from
feat/multi-session-debugging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One DAP session listens for connection and initiates a new DAP session via custom NewDbgpConnectionEvent. The extension activate/deactivate is created to short-circuit starting on new DAP sessions and forcing them to all be in-process.
zobo
force-pushed
the
feat/multi-session-debugging
branch
from
March 2, 2021 08:37
4962bd2
to
4c93d16
Compare
… multi instance, depending on how it is started. When closing listen socket, do not wait for all clients to close. Some can continue to be connected and live on in different instances of DAP sessions. Refactor launch closure function into private methods for better reuse. Handle both launchRequest and attachRequest - but only as connection handover.
Codecov Report
@@ Coverage Diff @@
## main #517 +/- ##
==========================================
- Coverage 66.69% 65.09% -1.60%
==========================================
Files 6 7 +1
Lines 1075 1126 +51
Branches 170 177 +7
==========================================
+ Hits 717 733 +16
- Misses 358 393 +35
Continue to review full report at Codecov.
|
…t one, all others loose their UI.
…to send a disconnectRequest this this session and that causes all threads to disconnect.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current support for multiple sessions is implemented by presenting different Xdebug sessions as DAP threads. The correct way of doing this would be to present each Xdebug session as individual DAP session. The DAP in it self does not support this (microsoft/vscode#116730) however vscode does, by extension code: https://code.visualstudio.com/api/extension-guides/debugger-extension#alternative-approach-to-develop-a-debugger-extension
The implementation I chose starts one DAP session that listens for Xdebug sessions. When Xdebug receives a connection a custom event is sent to extension code, and than in turn spawns a new DAP session. The socket object is stored statically and referenced via uniq id.
This way each Xdebug session has an isolated DAP state.