Skip to content

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

ts
new ProbeDebugAdapter(options?): ProbeDebugAdapter;

Defined in: adapter.ts:137

Nothing connects until a launch or attach request arrives.

Parameters

ParameterType
optionsAdapterOptions

Returns

ProbeDebugAdapter

Accessors

debugger

Get Signature

ts
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()

ts
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

ParameterType
listenerListener

Returns

ts
{
  dispose: void;
}
NameTypeDefined in
dispose()() => voidadapter.ts:147

handleMessage()

ts
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

ParameterType
messageProtocolMessage

Returns

void


dispose()

ts
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