Skip to content

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

@DanTup

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).

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