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

Implement vscode debug protocol #1573

Closed
tolusha opened this issue Mar 23, 2018 · 1 comment
Closed

Implement vscode debug protocol #1573

tolusha opened this issue Mar 23, 2018 · 1 comment
Assignees
Labels
dap debug adapter protocol enhancement issues that are enhancements to current functionality - nice to haves epic epic issues consisting of multiple smaller issues

Comments

@tolusha
Copy link
Contributor

tolusha commented Mar 23, 2018

Goal

  • Implement vscode debug protocol
  • Provide contribution point for debug adapters supporting vscode debug protocol.

Basically if debug adapter works with vscode it has to work with Theia ide too.

Implementation lives here

Architecture
DebugService is used to initialize a new debug session. This service provides functionality to configure and to start a new debug session. The workflow is the following. If user wants to debug an application and there is no debug configuration associated with the application then the list of available debuggers is requested to create suitable debug configuration. When configuration is chosen it is possible to alter the configuration by filling in missing values or by adding/changing/removing attributes. For this purpose the #resolveDebugConfiguration method is invoked. After that the debug session will be started.

DebugAdapterFactory starts a new debug adapter. The default implementation launches debug adapter at the same host but let's suppose that adapters can be launched as side-cars. That's why this abstraction is introduced.

DebugAdapterContribution is a contribution point for all debug adapters. Provides and resolves debug configuration. One missed thing here. Contribution needs context (selected project, active file, cursor position, etc) to provide a proper debug configuration. Finally contribution provides DebugAdapterExecutable that is treated to launch the adapter. Basically this is a map. It has to contain command and args properties to launch the adapter as a separate process.

DebugSession communicates to real debug adapter. Currently it just proxies request/responses from/to client. A lot of things missed here. There is a good example how it is done in vscode: ProtocolServer and LoggingDebugSession

DebugClient is designed to send/receive requests from/to server-side.

TODO

  • Implement missed things in DebugSession
  • Make fully-fledged debug-client
  • Send DebugProtocol.InitializeRequest to debug adapter and receive DebugProtocol.InitializeResponse

Resources

eclipse-che/che#8929

@tolusha tolusha added enhancement issues that are enhancements to current functionality - nice to haves epic epic issues consisting of multiple smaller issues labels Mar 23, 2018
@tolusha tolusha self-assigned this Mar 23, 2018
@tolusha
Copy link
Contributor Author

tolusha commented Apr 18, 2018

The UI part is introduced to edit and select debug configuration to start a debug adapter.

screenshot from 2018-04-18 09-56-18

@marcdumais-work marcdumais-work added the dap debug adapter protocol label May 15, 2018
@tolusha tolusha closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dap debug adapter protocol enhancement issues that are enhancements to current functionality - nice to haves epic epic issues consisting of multiple smaller issues
Projects
None yet
Development

No branches or pull requests

2 participants