microsoft / microsoft/debug-adapter-protocol

ExitedEvent versus TerminatedEvent

Open
#150 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

When should a debugger use the ExitedEvent vs the TerminatedEvent? The PowerShell debugger is launched (it doesn't support attach yet) but we are sending a TerminatedEvent at the end which apparently causes the client to send us a disconnectRequest which is a bit odd. We don't respond to this message because we are in the middle of shutting the debug host down. This results (sometimes) in a Error Canceled popup. It seems to happen when we pause/resume the debugger.

If I switch that to use the ExitedEvent we don't get the disconnectRequest message but the client pops a new error Error Debug adapter process has terminated unexpectedly. And if the program was paused and resumed it also pops up Error Canceled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the protocol definitions and the PowerShell debugger behavior for ExitedEvent, TerminatedEvent, disconnectRequest, and pause/resume. Reproduce the reported client errors and determine the event semantics that avoid both the unexpected-termination and canceled-error popups.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.