Skip to content

DAP: a Resume or a step that the debug adapter refuses leaves the session shown as running, and says nothing #2183

Done

Description

@lagergren

What happens

When the debug adapter refuses a Resume or a step, the debug session shows the program as running anyway, and nothing
says why. The program is still stopped: no frames, no variables, and Resume and the steps stay disabled until the user
pauses it.

The adapter refuses by answering continue, next, stepIn or stepOut with an error. For example:

  • the thread isn't stopped any more;
  • the adapter doesn't support single-thread stepping for that thread;
  • an internal error of the adapter.

Cause

Expected

A refused resume or step:

How it could be done

  • Have continue_, next, stepIn and stepOut return or handle their futures.
  • On an error answer:
    • report the message;
    • call executionEpoch.resumeRefused(...);
    • put the session back at its suspend context, with positionReached on that context, or on a new one asked from
      the adapter;
    • restore the run states that the request set, if no newer event changed them.
  • Check what XDebugger allows for suspending again without a new stop, on 2024.2 and 2026.3. DAPDropFrameHandler
    does something similar for a refused restartFrame.

Test

A session test: the debug adapter answers next with an error. The session ends up suspended at the same frame, the
error is reported, and Set Value still works at that frame.

Related: #2150, #2181.

Activity

  1. added this to the 0.30.2 milestone on Nov 24, 2026
  2. added
    bug
    dap
    on Nov 24, 2026
  3. added a commit that references this issue on Nov 25, 2026
    f0748c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdap

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions