Skip to content

await stack frames have duplicate ids #2234

@ConradIrwin

Description

@ConradIrwin

Describe the bug

When inserting await labels into the stack-frame, the id is hard-coded to 0:

return { name: this.label, id: 0, line: 0, column: 0, presentationHint: 'label' };
.

The first frame of the stack is also given id 0.

The spec requires that the ids of stack-frames can be used to uniquely identify a stack-frame (https://microsoft.github.io/debug-adapter-protocol/overview#lifetime-of-objects-references), so this leads to a situation where we have multiple stack frames with the same id.

I think we could either fix this by adding unique ids to the await labels, or by starting the stack frame ids from 1 so that the 0 can be a sentinel.

VS Code Version: Zed v0.190.0 ;)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions