Skip to content

Call Stack pause header disappears when continued cleanup removes a newer stopped event #339076

Closed

Description

Does this issue occur when all extensions are disabled?: Not tested. Reproduced with the Arm Debugger extension in an Extension Development Host; the evidence below captures the state being removed inside VS Code's workbench, rather than a missing debug-adapter event.

  • VS Code Version: 1.138.0, commit 7debcd0e2acdea1c52de81bf9ee1620444407dda (Linux snap)
  • OS Version: Ubuntu 24.04.4 LTS, x86_64; Linux 6.8.0-139-generic
  • Debug extension: Arm Debugger 2.0.0 development checkout
  • Latest stable / Insiders: Not yet tested. Latest stable is 1.140.0 at reporting time. The affected stoppedDetails push/filter logic is also present in upstream main at d547327fc4b6721ccf340c95b73bd6bffd708a78; this is a source check, not a claim of reproduction on that build.

Steps to reproduce (observed)

  1. Start a single-thread debug session that initially stops, then resumes and quickly hits an entry-point breakpoint (main in our case).
  2. Inspect the Call Stack after the entry-point breakpoint is hit.
  3. Stop and start the session again if needed; the problem is intermittent.

Expected: The Call Stack shows "Paused on breakpoint" when the target stops at the breakpoint.

Actual: The target is paused at main, and the stack frame/source location are correct, but the Call Stack pause-reason header is absent. There is no subsequent continued event in the failing session.

Captured workbench evidence

These are JSON snapshots from DevTools logpoints in the failing session, in execution order. JSON.stringify was used so these are not lazily evaluated object references.

Immediately before this.stoppedDetails.push(event) in DebugSession.handleStop:

{"point":"stop-before-push","incoming":{"allThreadsStopped":true,"hitBreakpointIds":[1],"preserveFocusHint":false,"reason":"breakpoint","threadId":2},"existing":[{"preserveFocusHint":false,"reason":"stopped","threadId":2}]}

Immediately before the continued-event handler's stoppedDetails.filter, with remaining calculated using that same filter:

{"point":"continued-cleanup","threadId":2,"before":[{"preserveFocusHint":false,"reason":"stopped","threadId":2},{"allThreadsStopped":true,"hitBreakpointIds":[1],"preserveFocusHint":false,"reason":"breakpoint","threadId":2}],"remaining":[]}

The older continued-event cleanup therefore removes the newer breakpoint-stop record as well as the initial stop record.

Adapter logs independently show this order:

stopped   {"preserveFocusHint":false,"reason":"stopped","threadId":2}
continued {"threadId":2}
stopped   {"allThreadsStopped":true,"hitBreakpointIds":[1],"preserveFocusHint":false,"reason":"breakpoint","threadId":2}
threads responses: thread 2 is present
stackTrace responses: top frame is main, line 26

Small regression-test scenario (no Arm target required)

The observed ordering suggests this focused test with a fake debug adapter:

  1. Establish thread 2 and its initial stopped state.
  2. Deliver continued for thread 2 and let its cleanup be scheduled but not executed yet.
  3. Deliver the breakpoint stopped event above, allowing handleStop to append the new record.
  4. Allow the earlier continued cleanup to execute before the new stop's asynchronous thread lookup completes; then resolve that lookup with thread 2 and a valid stack frame.
  5. Assert that the thread is stopped and session.getStoppedDetails()?.reason is "breakpoint".

This is a proposed deterministic regression test, not a standalone full-workbench reproduction we have already run. The real-session logpoints above confirm the record-removal ordering.

Relevant source

It appears the continued cleanup needs to invalidate only the older stop state, without removing a stop received after that continued event. No raw debugger logs, local file paths, or target binaries are needed to demonstrate the captured state mutation.

Activity

  1. added
    bug
    debug
    on Oct 1, 2026
  2. added a commit that references this issue on Oct 8, 2026
    6178351
  3. added
    unreleased
    on Oct 8, 2026
  4. added this to the 1.142.0 milestone on Oct 8, 2026
  5. added
    insiders-released
    and removed
    unreleased
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdebuginsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions