Skip to content

fix: Set Value works in a DAP thread which is still stopped after another thread continued alone - #2221

Merged
lagergren merged 2 commits into
redhat-developer:mainfrom
lagergren:fix/dap-set-value-after-single-thread-continue
Nov 25, 2026
Merged

lagergren merged 2 commits into
redhat-developer:mainfrom
lagergren:fix/dap-set-value-after-single-thread-continue

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

Fixes #2185

What

After a thread other than the stopped one continued alone (continued with allThreadsContinued: false), Set Value refused in the thread that was still stopped. It said "The program has run since this value was shown: show it again to set it." DAPClient.continued ended the execution epoch of #2150 on every continued event, of any thread. So every value of the stop counted as out of date, and so did Jump to Source and Jump to Value Source on them.

The findings in #2185 show the design, checked against the debug adapters' sources:

  • java-debug, debugpy and vscode-js-debug keep a stopped thread's references valid while another thread runs alone.
  • GDB clears every reference on any resume. It's the only one that advertises supportsSingleThreadExecutionRequests.

Change

  • continued with allThreadsContinued: false no longer ends the execution epoch. The thread that continued is marked as having left its stop, as before, in the run states of feat: the Threads tab of a DAP debug session shows which threads run, which are stopped and which exited #2181.

  • Frames carry their stop. DAPStackFrame keeps the run-state version of its stop, which DAPExecutionStack passes, and its thread, from feat: terminate a thread from the context menu of the Frames view of a DAP debug session #2217.

  • The new DAPClient.sendInExecutionEpoch(DAPStackFrame, …) sends a request only while both of these hold, checked in the same lock as before:

    • the frame's epoch is current;
    • the frame's thread hasn't left its stop (DAPThreadRunStates.leftStopSince).

    The thread that reads the debug adapter's messages still never waits on that lock: the run states are an atomic swap.

  • Callers: DAPValueModifier (Set Value), DAPExpressionModifier (Set Value on an Evaluate result) and DAPLocations (Jump to Source, Jump to Value Source) now pass their frame.

  • The epoch still ends for every thread on:

    • every Resume or step that LSP4IJ sends, including a singleThread: true one, which GDB needs;
    • any stopped event, including allThreadsStopped: true, which adapters that renumber at every stop need;
    • a continued event of all threads;
    • Reset Frame.
  • Compatibility: the existing sendInExecutionEpoch(int, …) overloads and the public DAPStackFrame constructors are unchanged.

  • Docs: one sentence in the Set Value section of docs/dap/UserGuide.md.

Not in this PR:

Tests

New DAPSetValueInAStoppedThreadSessionTest, 5 session tests with an in-process debug adapter of two threads. Every wait is bounded and has a message.

  • The worker continues alone: a local and an Evaluate result of main get setVariable and setExpression and show their new values. The worker's values refuse and send nothing.
  • A single-thread step: Step Over with singleThread: true makes both threads' values refuse.
  • A stop of all threads: the worker continues alone, then stops with allThreadsStopped: true. Both threads' earlier values refuse, and main's local at the new stop can be set.
  • A continue of all threads: both threads' values refuse.
  • Resume: both threads' values refuse.

DAPExecutionEpochTest gets one unit test for the new send.

Red-green: without the change, the first test fails (The local of 'main' is set). The other four pass either way: they guard behaviour that already worked. With the change, all pass.

On main at 4e15453, the two classes pass headless on IC 2024.2, 2025.3 and IU 2026.3: 19 tests each. The dap.* tests pass on all three: 551 tests each, with 0 failures or skipped.

Behaviour change

Before After
After another thread continues alone, Set Value, Jump to Source and Jump to Value Source on a value of the thread that's still stopped refuse: "The program has run since this value was shown" They work in the stopped thread. Values of the thread that continued alone, or exited, still refuse. A single-thread step, any stop, and a continue or Resume of all threads still make every thread's values refuse

…ther thread continued alone

When the debug adapter said that a thread other than the stopped one
continued alone ('continued' with allThreadsContinued: false), Set Value
refused every value of the stop, also those of the threads which stay
stopped, with "The program has run since this value was shown": the
client ended the execution epoch on every 'continued' event.

Such an event now ends the epoch only for the thread which continued.
The debug adapters which run a thread alone by themselves (java-debug,
debugpy, vscode-js-debug) keep the references of the other threads, and
VS Code clears only the call stack of that thread. A stack frame carries
its thread and the version of the run states of the threads at its
stop, and sendInExecutionEpoch checks, with the lock which a resume of
the session takes, that the frame's thread hasn't left the stop since
(DAPThreadRunStates.leftStopSince). Set Value, Jump to Value Source and
Jump to Source send their requests through it, so the values of the
thread which continued alone, or exited, still refuse.

Everything else still ends the epoch for every thread:
- a 'continued' event of all threads;
- any 'stopped' event, also one with allThreadsStopped: true for a
  thread which never left its stop, as a debug adapter may number the
  references of each stop from 1 again;
- a resume or a step of the session, also one with singleThread: true:
  GDB, the debug adapter which supports it, forgets the references of
  every thread whenever the program resumes.

sendInExecutionEpoch(int, ...) stays, checking the epoch only, and a
frame which doesn't know its thread is checked against its epoch only.

Fixes redhat-developer#2185
…ead continued alone, and in no thread after a single-thread step, a stop of all threads or a continue of all threads

A session test against a DAP server with the threads 'main' and
'worker', where 'main' stops with all threads:
- the worker continues alone: a local and an Evaluate result of main
  are set with setVariable and setExpression, and show their new
  values; those of the worker refuse and send nothing;
- Step Over with singleThread: true refuses the values of both threads;
- the worker continues alone and stops again with allThreadsStopped:
  the values of both threads at the earlier stop refuse, and a local of
  main at the new stop is set;
- a 'continued' event of all threads, and Resume, refuse the values of
  both threads.

DAPExecutionEpochTest: a request whose references are no longer valid
in the current epoch is not sent.
@lagergren lagergren added this to the 0.30.2 milestone Nov 25, 2026
@lagergren lagergren added bug Something isn't working dap Debugging Adapter Protocol labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved value editing during debugging when only some threads continue: values from threads that remain stopped can still be changed, while values from continued threads are correctly rejected as stale.
    • Prevented edits using outdated values after the program resumes or the relevant thread leaves its stop.
  • Documentation
    • Clarified when values can be set after a thread continues and when stopped frames are no longer available.

The DAP client preserves the execution epoch when one thread continues alone. Frame-based requests also check whether the frame’s thread has left its stop. Tests cover stopped-thread value updates and stale references after thread or session resumes.

Changes: Thread-aware DAP references

Layer / File(s) Summary
Epoch and frame state
src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPClient.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionEpoch.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionStack.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPStackFrame.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPThreadRunStates.java, src/test/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionEpochTest.java
A continued event with allThreadsContinued: false no longer ends the execution epoch. Frames retain the thread run-state version associated with their stop. The epoch send operation accepts a validity check, with a unit test for accepted and rejected requests.
Thread-aware requests and validation
src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPClient.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPExpressionModifier.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPLocations.java, src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPValueModifier.java, src/test/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPSetValueInAStoppedThreadSessionTest.java, docs/dap/UserGuide.md
Frame-based requests check both the execution epoch and whether the frame’s thread left its stop. Variable and expression operations pass the frame to this check. Integration tests cover mutations in stopped and continued threads, single-thread steps, all-thread stops, and session-wide resumes. The user guide documents the behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant DAPClient
  participant DAPExecutionEpoch
  participant DAPThreadRunStates
  participant DebugAdapter
  DAPClient->>DAPExecutionEpoch: send request with frame epoch and validity predicate
  DAPExecutionEpoch->>DAPThreadRunStates: check whether frame thread left its stop
  DAPExecutionEpoch->>DebugAdapter: send request when epoch and thread are valid
Loading
Merge Risk: Minimal · up to c9439

Set Value, Jump to Source, and Jump to Value Source now keep working for a thread that remains stopped after another thread continues alone. Values from the thread that continued or exited are refused as out of date. The changes fail closed and no concrete defect was found, so the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the primary change: Set Value now works in a DAP thread that is still stopped after another thread continues alone. The changeset implements this through the execution-epoch and frame-…
Description check Passed The description states the problem, the adapter-behavior findings, the new validation in sendInExecutionEpoch(DAPStackFrame, ...), the callers changed, the epoch rules that still apply, compatibility …
Linked Issues check Passed Directly linked issue #2185 has one coding requirement group: keep Set Value valid in a thread that stays stopped after another thread continues alone, and keep refusing values of the thread that cont…
Out of Scope Changes check Passed All changes connect to the #2185 objective or support it. DAPValueModifier, DAPExpressionModifier (Set Value on Evaluate results) and DAPLocations (Jump to Source, Jump to Value Source) all use the sa…
Full details: Title check

Explanation

The title names the primary change: Set Value now works in a DAP thread that is still stopped after another thread continues alone. The changeset implements this through the execution-epoch and frame-thread validation in DAPClient, DAPStackFrame, and the variable modifiers, so the title matches the main change. The title is 96 characters, slightly long but specific.

Full details: Description check

Explanation

The description states the problem, the adapter-behavior findings, the new validation in sendInExecutionEpoch(DAPStackFrame, ...), the callers changed, the epoch rules that still apply, compatibility notes, the new session tests, and the behavior change table. It matches the raw summary of changes closely.

Full details: Linked Issues check

Explanation

Directly linked issue #2185 has one coding requirement group: keep Set Value valid in a thread that stays stopped after another thread continues alone, and keep refusing values of the thread that continued. The change set addresses this. (1) DAPClient.continued no longer ends the execution epoch when the event sets allThreadsContinued to false (per the change summary). (2) DAPStackFrame records the run-state version of its stop, and DAPExecutionStack passes it. (3) The new DAPClient.sendInExecutionEpoch(DAPStackFrame, ...) checks the frame's epoch and DAPThreadRunStates.leftStopSince(version, threadId) inside the same lock, as the issue suggests. (4) DAPValueModifier passes its frame. The new test DAPSetValueInAStoppedThreadSessionTest covers the requested scenario: main stops, worker continues alone, setVariable is sent for main, and the worker's value refuses. DAPExecutionEpochTest adds a unit test for the new send. The issue's question about adapter behavior is answered with reported findings for java-debug, debugpy, vscode-js-debug and GDB. Limits: I could not read the DAPClient diff (changed blobs unavailable, and the file read was truncated before the continued handler). The conclusion rests on the PR description and change summary. The author's test runs (19 tests per class, 551 dap.* tests) were not re-run here.

Full details: Out of Scope Changes check

Explanation

All changes connect to the #2185 objective or support it. DAPValueModifier, DAPExpressionModifier (Set Value on Evaluate results) and DAPLocations (Jump to Source, Jump to Value Source) all use the same epoch gate, so moving them to the frame-based check follows from the change. The extension to Evaluate and source navigation is an explicit part of the PR description. The DAPStackFrame, DAPExecutionStack, DAPThreadRunStates and DAPExecutionEpoch edits implement the frame-carried stop version and the lock-guarded check. The docs change is one sentence in the Set Value section, which describes the new behavior. The new tests support the change. The behavior change for values of an exited thread, which now refuse, is disclosed in the PR and is a consequence of the thread-level check. The continue-without-singleThread limitation is stated as not in scope. I could not read the changed hunks directly, so this verdict relies on the change summary and PR description.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4079f08e-f35b-4c9d-94a3-0139aa9f2585
Commits

Reviewing files that changed from the base of the PR and between 4e15453 and c9439fe.

Files selected for processing: 11

  • docs/dap/UserGuide.md
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPClient.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionEpoch.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionStack.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPStackFrame.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/DAPThreadRunStates.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPExpressionModifier.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPLocations.java
  • src/main/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPValueModifier.java
  • src/test/java/com/redhat/devtools/lsp4ij/dap/client/DAPExecutionEpochTest.java
  • src/test/java/com/redhat/devtools/lsp4ij/dap/client/variables/DAPSetValueInAStoppedThreadSessionTest.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.40%. Comparing base (4e15453) to head (c9439fe).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...m/redhat/devtools/lsp4ij/dap/client/DAPClient.java 75.00% 1 Missing and 1 partial ⚠️
...dhat/devtools/lsp4ij/dap/client/DAPStackFrame.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2221   +/-   ##
=======================================
  Coverage   55.39%   55.40%           
=======================================
  Files         842      842           
  Lines       35882    35894   +12     
  Branches     5629     5628    -1     
=======================================
+ Hits        19878    19888   +10     
- Misses      13116    13120    +4     
+ Partials     2888     2886    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

lagergren added a commit to lagergren/lsp4ij that referenced this pull request Nov 25, 2026
…only when it is blocked on the lock which the test's other thread holds

waitUntilBlockedOrEnded returned as soon as a thread was BLOCKED. A thread
is also blocked for a moment on other locks of the JVM, such as a lock of
the coverage agent, or of a class which another thread of the test's
application loads. ./gradlew check runs the whole suite in one JVM with
the IDE's threads, so aRefusalDoesNotWaitWhileARequestOfAnEpochIsWritten
failed on the Linux 2025.3 CI jobs of redhat-developer#2221 and redhat-developer#2220 with "expected:
<TERMINATED> but was: <BLOCKED>", although the refusal took no lock that
the test held.

waitUntilBlockedByOrEnded now counts a thread as blocked only when the
lock it waits for is held by the given owner: the thread that writes its
request with the epoch's lock held (ThreadInfo.getLockOwnerId).
lagergren added a commit that referenced this pull request Nov 25, 2026
…only when it is blocked on the lock which the test's other thread holds (#2222)

## What

`DAPExecutionEpochTest.aRefusalDoesNotWaitWhileARequestOfAnEpochIsWritten` (#2201) failed twice, on the Linux 2025.3 CI jobs of #2221 and #2220:

```
org.opentest4j.AssertionFailedError: the refusal waits for the request ==> expected: <TERMINATED> but was: <BLOCKED>
```

`resumeRefused` takes no lock that the test holds: it synchronizes only on its own set, which no other thread of the test holds. But `waitUntilBlockedOrEnded` returned as soon as the thread was `BLOCKED`. A thread is also blocked for a moment on other locks of the JVM, such as a lock of the coverage agent, or of a class that another thread of the test's application loads. `./gradlew check` runs the whole suite in one JVM with the IDE's threads, which is why it fails on CI and not when the class runs alone. The same helper could also let `aResumeWaitsUntilTheRequestOfTheEpochIsWritten` see `BLOCKED` too early.

## Change

Test only. The helper is now `waitUntilBlockedByOrEnded(thread, owner)`. It counts a thread as blocked only when the lock it waits for is held by the owner (`ThreadInfo.getLockOwnerId`). The owner is the thread that writes its request with the epoch's lock held. A lock of the JVM held by another thread no longer counts, and no timing is involved.

## Tests

- **Red:** with `resumeRefused` changed to synchronize on the epoch's lock, the test fails (`BLOCKED`), so it still guards that the reader thread never waits on the lock.
- **Green:** with the real code, `DAPExecutionEpochTest` (13 tests) passes headless on IC 2024.2, 2025.3 and IU 2026.3. The `dap.*` tests pass on 2025.3, headless: 545 tests, 0 failures.
@lagergren
lagergren merged commit a3d6dd0 into redhat-developer:main Nov 25, 2026
13 of 14 checks passed
lagergren added a commit that referenced this pull request Nov 25, 2026
… session suspended where it was, and says why (#2223)

Fixes #2183

## What

IntelliJ shows a debug session as running before it asks the debug process for Resume Program, Step Over, Step Into, Smart Step Into or Step Out. LSP4IJ then sent `continue`, `next`, `stepIn` or `stepOut` and dropped the answer. So when the debug adapter refused, as an adapter that can't resume one thread alone does:
- the session showed the program running while it was still stopped, without frames or variables;
- Resume and the steps stayed disabled until Pause;
- nothing said why.

The same happened at a breakpoint that doesn't suspend, to the `continue` that resumes the program from it, or after a reverse run (#2201) the `reverseContinue`. There the console said only "Cannot handle the breakpoint: …".

## Change

The client now handles the answer. On an error, the console says why ("Cannot step over: <adapter's message>", and so on), as for a refused Step Back, Reverse Continue or Reset Frame. What the request changed before it was sent is undone, unless a newer event changed it since:
- **Execution epoch:** the stop's epoch is current again (`DAPExecutionEpoch.resumeRefused`), so Set Value works at its frames. A Step Back, Reverse Continue or Reset Frame still pending at the stop keeps the epoch ended until the debug adapter refuses that too.
- **Run states:** the threads that the request resumed get their run states back, and the Threads tab shows them stopped again. A thread that exited meanwhile stays exited, and a newer stop, or a `continued` event of all threads, wins.
- **Suspend context:** the session is suspended again, with `positionReached`, at the suspend context that IntelliJ resumed it from, with the same frames.
  - This doesn't happen if the debug adapter said meanwhile that the program stopped or continued, or if another stop suspended the session.
  - XDebugger takes the same context again on 2024.2, 2025.3 and 2026.3, as a new stop.
  - A pending Run to Cursor breakpoint is removed, as at any stop.
- **Non-suspending breakpoints:** the automatic `continue`, or `reverseContinue` after a reverse run, is handled the same way. The program is still stopped at the breakpoint, so the session is suspended there, unless a newer `stopped` or `continued` event came first, which the session then follows. CodeRabbit asked for this on #2201.
- **`DAPExecutionEpoch.resumeRefused`** now returns whether the program is where it was when the request was sent. That means the epoch the request ended, or an earlier one, is current again, and no `stopped` or `continued` event came since. It merges #2201's handling of several refused requests.
- **API:** `DAPClient` keeps `continue_(int)`, `next`, `stepIn` and `stepOut`, and gets overloads that take the suspend context, which `DAPDebugProcess` and Smart Step Into pass.

Not in this PR:
- Resume is pressed while a Reverse Continue is pending, the adapter accepts the Reverse Continue, and then refuses Resume. The session briefly shows the old stop again until the Reverse Continue's `stopped` event arrives, and Set Value there refuses as stale. Fixing that would mean recording accepted requests in `DAPExecutionEpoch`. It takes two quick clicks.
- A `continue` answer with `allThreadsContinued: false` to a request without `singleThread` still counts as all threads. See #2221.

## Tests

New `DAPRefusedResumeSessionTest`, 11 session tests with an in-process debug adapter that refuses chosen requests, can hold its answers, and can send a newer event right before a refusal:
- **Refused Resume, Step Over, Step Into, Smart Step Into and Step Out:** the session is suspended at the same frame, the console says why, and Set Value works there.
- **Refused automatic resume at a non-suspending breakpoint:**
  - a `continue` reached by Resume, and a `reverseContinue` reached by Reverse Continue: suspended at the breakpoint, the epoch current, the Threads tab "stopped", one pause;
  - each with a newer `stopped` event first: suspended only at the newer stop, with exactly one pause;
  - each with a newer `continued` event first: not suspended, the Threads tab "running", and the next stop suspends it.
- **Combined with #2201:**
  - Resume refused while a Reverse Continue is pending: suspended again at the stop, whose epoch stays ended until the Reverse Continue is refused too.
  - The same, but the Reverse Continue is accepted: the session runs.
  - Reverse Continue refused while Resume is pending: the session runs, and is back at the stop once Resume is refused too.

New unit tests in `DAPExecutionEpochTest`, `DAPClientSuspendAgainTest` and `DAPThreadRunStatesTest`.

Red-green, headless:
- Ignoring `resumeRefused`'s result makes the 4 newer-event tests fail.
- Main's breakpoint handling makes the 6 breakpoint tests fail.
- `==` instead of `<=` in `resumeRefused` makes the reverse-order tests fail.
- With the change, all pass.

On main at 4e15453, the changed classes pass headless on IC 2024.2, 2025.3 and IU 2026.3: 51 tests each. The `dap.*` tests pass on all three: 564 tests each, with 0 failures or skipped.

### After the review

- **Several refused requests:** two pending Resumes or steps that are both refused restore the run states as if neither had been sent, in either order. Before, when the older one was refused first, the Threads tab showed a thread running that the adapter still had stopped.
  - Each run state that a request sets records the request, and the snapshot before a refused request is kept while a newer request's change is still shown.
  - Newer `stopped`, `continued` and `thread` events are never undone.
- **Tests:**
  - New unit tests in `DAPThreadRunStatesTest`, and a two-thread session test with two non-suspending breakpoints whose automatic continues are both refused, in either order. Both fail without the change.
  - The changed classes pass headless on IC 2024.2, 2025.3 and IU 2026.3: 40 tests each. The `dap.*` tests pass on all three: 571 tests each, with 0 failures or skipped.
  - A randomized model test, not committed (20,000 runs of 30 steps), checked the run states against a replay without the refused requests. It passes, and the earlier code failed it.

## Behaviour change

| Before | After |
|---|---|
| The debug adapter refuses Resume Program, Step Over, Step Into, Smart Step Into or Step Out: the session shows the program running though it is still stopped, with no frames or variables, Resume and the steps stay disabled until Pause, and nothing says why | The console says why ("Cannot step over: <adapter's message>", etc.). The session is suspended again where it was, with the same frames, Set Value works there, and the Threads tab shows the threads stopped |
| At a breakpoint which doesn't suspend, the debug adapter refuses the `continue`, or after a reverse run the `reverseContinue`, which resumes the program: the session shows it running, and the console says only "Cannot handle the breakpoint: …" | The console says "Cannot resume the program: …" or "Cannot reverse continue: …", and the session is suspended at the breakpoint. If the adapter said meanwhile that the program stopped or continued, the session follows that event instead |
| Resume is refused while a Step Back, Reverse Continue or Reset Frame is still pending | The session is suspended again at the stop, and its values can be set once the pending request is refused too. If the adapter accepts the pending request instead, the session runs |
| Two threads stop alone at breakpoints that don't suspend, and the debug adapter refuses both automatic continues, the older first: the Threads tab shows one thread running while the adapter still has it stopped | Both threads show stopped, whichever refusal comes first |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dap Debugging Adapter Protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAP: Set Value in a thread that is still stopped after another thread continued alone

1 participant