Skip to content

Support "attach" stop reason #566

Open

Description

@nd-work

Some debuggers suspend the execution after an attachment to a running program.

Sometimes this behavior is useful, other times it is more convenient to resume after attach automatically.

Please add the "attach" stop reason to the list of known values in the StoppedEvent.reason.

This will facilitate interaction between editors and debuggers and allow configuring the behavior on the DAP client side.

Activity

  1. mfussenegger commented on Oct 17, 2025

    @mfussenegger
    Contributor

    Many debug adapters already support a stopOnEntry property that's part of the launch request to control if it should stop immediately. Couldn't this pattern be used for attach too?

  2. nd-work commented on Oct 17, 2025

    @nd-work
    Author

    Oh, I didn't know about stopOnEntry.

    I think the attach stop reason can be useful on its own. For example, when a debugger doesn't allow to configure the stopOnEntry behavior, it can still report the stop after attach.

    In my opinion it would be great to have both stopOnEntry and attach stop reason in the spec to simplify coordination between clients and servers.

  3. connor4312 commented on Oct 17, 2025

    @connor4312
    Member

    We have the stop reason entry which is intended to be used for this purpose.

  4. nd-work commented on Oct 17, 2025

    @nd-work
    Author

    Can stopOnEntry get an official description in the spec?
    I believe debuggers will have more incentives to support it.

  5. tromey commented on Oct 17, 2025

    @tromey

    We have the stop reason entry which is intended to be used for this purpose.

    It would be great if the meaning of these values was spelled out in the spec. I didn't know what this one meant when writing the gdb DAP implementation so I just ignored it...

  6. connor4312 commented on Oct 17, 2025

    @connor4312
    Member

    Can stopOnEntry get an official description in the spec?

    stopOnEntry is a common configuration value of various debug adapters, but this configuration is not in-scope for DAP.

    It would be great if the meaning of these values was spelled out in the spec. I didn't know what this one meant when writing the gdb DAP implementation so I just ignored it...

    👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions