Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[lsp4e-dev] How to cleanly terminate a session?

I'm using lsp4e to try to create a debug adapter for the collection of VDM language dialects.

VDM interpreters need to evaluate an _expression_ (or a series of them) and receive a result, so I'm using the REPL console to send DAP "evaluate" requests. I can successfully stop at a breakpoint and build the frames and scopes to display the stack and system state. But at the end, I can't see how to cleanly terminate a session from the console. The console "stop button" does not seem to work and I can't find any key sequence in the console to end it (CTRL-D etc?). I usually end up "killing" the adapter in the Eclipse Debug view, which doesn't always work and eventually seems to confuse the IDE completely.

I have occasionally seen "terminate" and "disconnect" DAP commands being sent, but not every time. It looks like killing the DA sends "terminate"? But the thread is still displayed even after a "success" response to that, and I cannot easily remove the Debug Adapter Target from the Debug view. Once you kill it by force, the whole thing usually locks up on subsequent launches.

Is there a clean way to close a session?

Cheers,
-nick

Back to the top