Skip to content

Debug Adapter should drop references to variables, scopes, stack frames when execution resumes #4420

Closed

Description

@DanTup

https://microsoft.github.io/debug-adapter-protocol/overview#lifetime-of-objects-references

To simplify the management of object references in debug adapters, their lifetime is limited to the current suspended state. Once execution resumes, object references become invalid and DAP clients must not use them.
...
Please note that other object references like threadId do not have limited lifetime because that would prevent something like the pause request from working in the running state.

We should probably store a flag with StoredData stating whether data can be dropped when resuming.

(We may need to consider when we clear variablesReferences for global evaluations, since those may still be visible in the Debug Console and users might still want to interact with them).

Activity

  1. added this to the v3.62.0 milestone on Mar 3, 2023
  2. modified the milestones: v3.62.0, v3.64.0, v3.66.0 on Mar 30, 2023
  3. modified the milestones: v3.66.0, v3.68.0 on May 16, 2023
  4. DanTup commented on Jun 20, 2023

    @DanTup
    MemberAuthor
  5. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Jun 28, 2023
  6. DanTup commented on Jun 28, 2023

    @DanTup
    MemberAuthor

    Fixed by dart-lang/sdk@01c02d6, ships in SDKs.

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

    in debuggingRelates to the debug adapter or process of running debug sessionsis performancerelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions