Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debug] VSCode sends invalid frameId in scopes request #40189

Closed
vadimcn opened this issue Dec 14, 2017 · 3 comments
Closed

[Debug] VSCode sends invalid frameId in scopes request #40189

vadimcn opened this issue Dec 14, 2017 · 3 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@vadimcn
Copy link
Contributor

vadimcn commented Dec 14, 2017

Version 1.18.1
Commit 929bacba01ef658b873545e26034d1a8067445e9
Date 2017-11-16T18:34:22.110Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

When quickly stepping through source lines, the VSCode sometimes sends to debug adapter this sequence of requests:

  • stackTrace
  • next
  • scopes using frameId it received in response to stackTrace

Since execution had already been resumed after stackTrace, the frameId is invalid.
Well, that's my assumption that should be invalid. I don't think this is mentioned in docs anywhere, but it's a logical assumption, since after stepping we might be stopped in a different stack frame.

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Dec 14, 2017
@isidorn isidorn added this to the December 2017/January 2018 milestone Dec 15, 2017
@isidorn
Copy link
Contributor

isidorn commented Jan 5, 2018

I acknowledge that this issue can happen and not sure I will do something about it on the vscode side. Theoretically I could cancel all scheduled request as soon as the user presses next.
But the adapter can also easily handle this by ignoring the invalid frameId.

Assigning to backlog until some issue surfaces to the user regarding this.
fyi @weinand

@isidorn isidorn modified the milestones: December 2017/January 2018, Backlog Jan 5, 2018
@isidorn isidorn added the under-discussion Issue is under discussion for relevance, priority, approach label Jan 5, 2018
@vadimcn
Copy link
Contributor Author

vadimcn commented Jan 5, 2018

I think you should cover this in the debug protocol documentation then, because it has implications for design of the debug adapter. At first sight, reusing the same stack frame ids on every stackTrace request seems like a viable option, but it won't allow the adapter to detect and reject stale frameIds.
Same goes for variable references, btw. I've been assuming that they become invalid after resuming execution, but this isn't explicitly stated anywhere, as I recall.

@isidorn
Copy link
Contributor

isidorn commented Jun 6, 2018

Duplicate of #50896 which I plan to tackle today

@isidorn isidorn closed this as completed Jun 6, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

2 participants