probe-web / @probe-web/dap / ProbeDebugAdapter
Class: ProbeDebugAdapter
Defined in: adapter.ts:122
An inline Debug Adapter Protocol server for one probe-rs debug session.
Feed it DAP requests with ProbeDebugAdapter.handleMessage and listen for responses and events with ProbeDebugAdapter.onDidSendMessage; it has the shape of VS Code web's DebugAdapterInlineImplementation. launch and attach take ProbeLaunchArguments and connect through AdapterOptions.connect. The usual sequence is initialize, launch or attach, wait for the initialized event, set breakpoints, then configurationDone, which starts the target running (or reports the stop on entry). Stop and continue events are held back until then.
Request handlers are the protected on_<command> methods; an unknown command gets a failed response.
Constructors
Constructor
new ProbeDebugAdapter(options?): ProbeDebugAdapter;Defined in: adapter.ts:137
Nothing connects until a launch or attach request arrives.
Parameters
| Parameter | Type |
|---|---|
options | AdapterOptions |
Returns
ProbeDebugAdapter
Accessors
debugger
Get Signature
get debugger(): DebuggerLike | null;Defined in: adapter.ts:142
The debugger created by launch / attach, for hosts that also show other views of it.
Returns
DebuggerLike | null
Methods
onDidSendMessage()
onDidSendMessage(listener): {
dispose: void;
};Defined in: adapter.ts:147
Receive every response and event the adapter sends. Returns a disposable that removes the listener.
Parameters
| Parameter | Type |
|---|---|
listener | Listener |
Returns
{
dispose: void;
}| Name | Type | Defined in |
|---|---|---|
dispose() | () => void | adapter.ts:147 |
handleMessage()
handleMessage(message): void;Defined in: adapter.ts:157
Handle one DAP request. The response, and any events, go to ProbeDebugAdapter.onDidSendMessage listeners; messages that are not requests are ignored.
Parameters
| Parameter | Type |
|---|---|
message | ProtocolMessage |
Returns
void
dispose()
dispose(): void;Defined in: adapter.ts:163
Disconnect without a DAP disconnect request (e.g. on page unload); the target is left as it is.
Returns
void