An open API service indexing awesome lists of open source software.

https://github.com/loyieking/debugadapterprotocol.net

Visual Studio Code DebugAdapterProtocol written in C#
https://github.com/loyieking/debugadapterprotocol.net

csharp dap debug debugadapterprotocol dotnet dotnet-core dotnet-standard extension lsp visual-studio-code vscode

Last synced: 2 months ago
JSON representation

Visual Studio Code DebugAdapterProtocol written in C#

Awesome Lists containing this project

README

          

# DebugAdapterProtocol.NET

Visual Studio Code DebugAdapterProtocol written in C#(.NET Standard)

## Usage

```C#
Server = new ProtocolServer(InputStream,OutputStream);
Server
.RegisterProtocolMessage(OnInitialize)
.RegisterProtocolMessage(OnDisconnect)
.RegisterProtocolMessage(OnLaunch)

.RegisterProtocolMessage(OnSetBreakpoints)
.RegisterProtocolMessage(OnSetExceptionBreakpoints)
.RegisterProtocolMessage(OnConfigurationDone)
.RegisterProtocolMessage(OnSource)

.RegisterProtocolMessage(OnThreads)
.RegisterProtocolMessage(OnStackTrace)
.RegisterProtocolMessage(OnScopes)
.RegisterProtocolMessage(OnVariables)

.RegisterProtocolMessage(OnEvaluate)

.RegisterProtocolMessage(OnContinue)
.RegisterProtocolMessage(OnNext)
.RegisterProtocolMessage(OnStepIn)
.RegisterProtocolMessage(OnPause)
.Start().Wait()
;
```

```C#
private void OnInitialize(ProtocolServer server, InitializeRequest request)
{
Capabilities capabilities = new Capabilities(
supportsSetVariable: true,
supportsRestartRequest: false,
supportsEvaluateForHovers:false,
supportsConfigurationDoneRequest:true,
supportsFunctionBreakpoints:true
);

InitializeResponse response = new InitializeResponse(request, true, capabilities);
server.SendMessage(response);
}
```

## TODO

- [ ] Add OnRequestDelegateHandler and OnRequestHandler

- More...