Implement vscode debug protocol #1573
Labels
dap
debug adapter protocol
enhancement
issues that are enhancements to current functionality - nice to haves
epic
epic issues consisting of multiple smaller issues
Goal
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 providesDebugAdapterExecutable
that is treated to launch the adapter. Basically this is a map. It has to containcommand
andargs
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 LoggingDebugSessionDebugClient
is designed to send/receive requests from/to server-side.TODO
DebugSession
DebugProtocol.InitializeRequest
to debug adapter and receiveDebugProtocol.InitializeResponse
Resources
eclipse-che/che#8929
The text was updated successfully, but these errors were encountered: