Commit Graph

10 Commits (3da63fa481711f1b3132eb162e089dcc972e931a)

Author SHA1 Message Date
Filip Dutescu e3765ac6d2
feat(dap): send Disconnect if Terminated event received (#5532)
Send a `Disconnect` DAP request if the `Terminated` event is received.
According to the specification, if the debugging session was started by
as `launch`, the debuggee should be terminated alongside the session. If
instead the session was started as `attach`, it should not be disposed of.

This default behaviour can be overriden if the `supportTerminateDebuggee`
capability is supported by the adapter, through the `Disconnect` request
`terminateDebuggee` argument, as described in
[the specification][discon-spec].

This also implies saving the starting command for a debug sessions, in
order to decide which behaviour should be used, as well as validating the
capabilities of the adapter, in order to decide what the disconnect should
do.

An additional change made is handling of the `Exited` event, showing a
message if the exit code is different than `0`, for the user to be aware
off the termination failure.

[discon-spec]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect

Closes: #4674

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
2 years ago
xiaoma20082008 ce0837dbb7
DAP: Add request ID to request timeout message (#6018)
This improves error logging for dap requests. Without the ID
it's hard to know which request is the one that timed out.
2 years ago
Blaž Hrastnik 83a8167402 Invert core -> dap dependency 3 years ago
Dmitry Sharshakov d943a51e3e
editor: add Node.js debugger 3 years ago
Blaž Hrastnik 28658836ee Add more event types, simplify event decoding 3 years ago
Blaž Hrastnik 3a9e1c305b Refactor types, add a Request trait 3 years ago
Blaž Hrastnik 2d1ae2e44b dap: Split types off into types.rs 3 years ago
Dmitry Sharshakov b3be6b269a dap-basic: parse stop event 3 years ago
Dmitry Sharshakov 09390be6a5 dap-basic: handle output events 3 years ago
Dmitry Sharshakov 0f6e81b85b Initial debug adapter protocol implementation 3 years ago