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

Node debug gives stale variables if evaluation happened #15520

Closed
isidorn opened this issue Nov 15, 2016 · 4 comments
Closed

Node debug gives stale variables if evaluation happened #15520

isidorn opened this issue Nov 15, 2016 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@isidorn
Copy link
Contributor

isidorn commented Nov 15, 2016

  1. Debug the following program
var text = "some text";
debugger;
  1. In repl or watch expressions do text = "new value"
  2. Notice how the variables view shows a stale value for text - VSCode is sending a variables request but the node debug is responding with stale results

Also happening for node2 @roblourens
We would need to drop all cached variables on evaluation request, though not sure how expensive that is.

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 15, 2016
@roblourens
Copy link
Member

vscode is sending a new variables request after an eval, but the wrong values are returned? node2 definitely doesn't cache any values. I'll try it out though.

@isidorn
Copy link
Contributor Author

isidorn commented Nov 15, 2016

exactly - but get latest vscode source for that. Or on insiders switch focused stack frame - that should always send new variables requests

@roblourens
Copy link
Member

It seems like these are being cached by Node/Chrome, so I don't think there's anything I can do there. It returns the same values until a step happens.

@weinand weinand added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Nov 22, 2016
@weinand
Copy link
Contributor

weinand commented Nov 22, 2016

Same for node-debug. If I turn off caching, I still see the same behavior.

The only workaround I could imagine would be to update all values in the cache by doing an 'evaluate'.
But this doesn't seem practical as the cache might become large.

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 upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants