You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A DAP session whose connection closes without a terminated event is never noticed #1939
DAPClient learns that a debug session ended only from its terminated event. When the connection of a session closes without one, nothing notices: connectToServer() keeps the Future of Launcher.startListening() only to cancel it in dispose(), and nothing waits for it to complete. This happens when the debug adapter crashed or was killed, or when the socket of a child session that vscode-js-debug started with startDebugging dropped. LSP4IJ then goes on treating the session as live.
fix(dap): keep the debug session while another session of the tree is alive #1899 keeps the debug process running while any session of the tree hasn't sent terminated. A child whose connection closed without it counts as alive for good, so the debug process doesn't stop when the other sessions end, and the user has to click Stop. On main the process stopped at the first terminated.
When the message loop of a session ends while the session is still live (it hasn't sent terminated, and it isn't being disposed), handle it as that session's terminated:
mark the session terminated;
forget its breakpoint answers;
stop the debug process if no session of the tree is still alive.
This needs a hook on the end of the message loop. For instance, a task on the client's threadPool could wait for the Future of startListening(), or a wrapper of the input stream could report its end.
Activity
fix: end a DAP session whose connection closes without `terminated`
docs: the DAP session tree and the API changes in the change notes fo…
fix: end a DAP session whose connection closes without `terminated` (r…
docs: change notes for 0.30.0 (#1941)