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

Add DebugAdapterNamedPipeServer and DebugAdapterInlineImplementation #10163

Merged

Conversation

tsmaeder
Copy link
Contributor

@tsmaeder tsmaeder commented Sep 24, 2021

What it does

Adds new debug adapter descriptor types to the plugin API
Fixes #10006

How to test

Check out the mock debug extension (https://github.com/Microsoft/vscode-mock-debug) and build it (yarn compile & yarn package) in various debug adapter mode (see extension.ts#21). Also, you need to remove some stuff that we don't support yet from activateMockDebug.ts, here's the changed file:

activateMockDebug.ts.txt

The extension allows to add a launch configuration that will step through any *.md file. You just have to point the config at a concrete file instead of using the "select file" command.

Note that there is a bug in session management curently: #10164. The bug is present independent of the introduction of new debug adapter types in this PR and therefore should be handled separately.

Review checklist

Reminder for reviewers

@vince-fugnitto vince-fugnitto added debug issues that related to debug functionality vscode issues related to VSCode compatibility labels Sep 24, 2021
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look quite good to me, I was able to successfully debug with all four different debug flags.

I had a few issues testing any flags that relied on the external debugAdapter.js process, since that isn't built by the webpack config. I'll include all compiled vsix (including the debugAdapter.js) in a single zip here for other reviewers. Be aware that after installing a different version of the extension the backend needs to be restarted, as new debug adapters will not override old ones:

mock-debug-0.46.7.zip

Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it using the vscode-mock-debug extension and it works fine 👍

I have just noticed a possible copy/paste issue as per inline comment.

One comment:
I ran into some additional adjustments to be able to compile and re-run the `vscode-mock-debug' extension, I had to use this extension in the PR mentioned below and created a branch to make it easier for reviewers. may be something to consider.
Hopefully we can have a fully working branch after few more fixes in the area.
#10134

@svor svor mentioned this pull request Sep 28, 2021
25 tasks
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
Signed-off-by: Thomas Mäder <tmader@redhat.com>
@tsmaeder tsmaeder force-pushed the 10006_add_debug_adapter_descs branch from 2328ae5 to fbefdc1 Compare October 7, 2021 09:31
@tsmaeder
Copy link
Contributor Author

tsmaeder commented Oct 7, 2021

@alvsan09 @msujew I've addressed the comments and rebased the branch. Now I just need an approval :-)

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me! I am successfully able to run the different configs of the mock extension using Theia now.

Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me !
Thanks Thomas! 👍

@tsmaeder tsmaeder merged commit 8c68758 into eclipse-theia:master Oct 7, 2021
@tsmaeder tsmaeder mentioned this pull request Oct 27, 2021
1 task
@vince-fugnitto vince-fugnitto added this to the 1.19.0 milestone Oct 28, 2021
@thegecko
Copy link
Member

thegecko commented Nov 3, 2021

This file debug/lib/node/debug-model should have been kept in the common folder. The move has blocked browser-based adapters from working.

cc @tsmaeder

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Nov 3, 2021

@thegecko you're right, of course, it just looked like an implementation detail of the back end. Can you open an issue with what you need in the common folder so we can track it?

@thegecko
Copy link
Member

thegecko commented Nov 3, 2021

@thegecko you're right, of course, it just looked like an implementation detail of the back end. Can you open an issue with what you need in the common folder so we can track it?

I think this work and your efforts in #10333 allows me to upstream in-browser debug adapter support more easily, so I could make these changes when doing that.

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Nov 3, 2021

@thegecko currently, the default implementation of the DebugService lives in the back end. Moving that to the front end would more easily allow for contributors to implement debug adapter connections in the front or back end. It's a bit bass ackwards, right now, if you ask me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Inline and Named Pipe Debug Adapters
5 participants