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

Variables, Watches not updated when changed from debug console #2399

Closed
chrisdias opened this issue Jan 26, 2016 · 17 comments
Closed

Variables, Watches not updated when changed from debug console #2399

chrisdias opened this issue Jan 26, 2016 · 17 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Milestone

Comments

@chrisdias
Copy link
Member

when I update a variable in the debug console while in break mode, the updated value is not reflected in the Variables or Watch panes of the debug viewlet.

  • open a simple node/javascript workspace
  • add some code such as

var x = 10;

  • set a breakpoint on that line, launch app under debugger
  • when broken, change x from the debug console prompt

result -> the value is not updated in the Variables/Local tree or the Watch tree (if you set up a watch).

found while testing #2171

@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 27, 2016
@isidorn isidorn added this to the Backlog milestone Jan 27, 2016
@isidorn
Copy link
Contributor

isidorn commented Feb 2, 2016

The values will be updated once you do a step.
I am not a big fan of re-evaluating all watch expressions once you evaluate anything in the console, though we could do that. But this would cause the whole variables and watch pane to flicker once you evaluate something in the console.

I would close this as designed. @weinand opinions?

@weinand
Copy link
Contributor

weinand commented Feb 2, 2016

@isidorn what's the behaviour in Chrome dev tools, node-inspector, or VS?

@isidorn
Copy link
Contributor

isidorn commented Feb 2, 2016

Chrome and node-inspector do not update it, they behave same as we do -> closing as deigned

@isidorn isidorn closed this as completed Feb 2, 2016
@weinand
Copy link
Contributor

weinand commented Feb 2, 2016

+1

@chrisdias chrisdias reopened this Feb 2, 2016
@chrisdias
Copy link
Member Author

As a user, the expectation is that these values change when I change them in the console. Visual Studio does this - it will update the watch, floating data tips, etc. when changing values during break mode. This is the experience we are striving for.

@isidorn
Copy link
Contributor

isidorn commented Feb 2, 2016

This is a valid feature request but it will cause the variables pane and watch pane to flicker every time you evaluate something in the console

@isidorn isidorn added the feature-request Request for new features or functionality label Feb 2, 2016
@isidorn isidorn removed their assignment Feb 2, 2016
@chrisdias
Copy link
Member Author

I guess I don't know why there is no flicker on step. I suggest then that we fix the flicker to make the desired experience great!

@isidorn
Copy link
Contributor

isidorn commented Feb 2, 2016

You are right, because we preserve the tree element ids the flicker might not be big. Worth experimenting with, so on each evaluate from the repl I would refresh all the variables and all the watch expressions

@isidorn isidorn self-assigned this Feb 2, 2016
@isidorn
Copy link
Contributor

isidorn commented Feb 5, 2016

Will add this only if more users ask for it

@isidorn isidorn removed their assignment Feb 5, 2016
@csholmq
Copy link

csholmq commented Feb 5, 2016

+1

My remote GDB debugging would really benefit from having Watches update continuously when doing not using breakpoints. This works with GDB in Eclipse where variables are polled over and over again also on hover.

@harold-b
Copy link

+1
I was actually surprised it did not update when changing them in the console. Since there is no way to change values by clicking them on the tree, this would be most useful.

@tdorsey
Copy link

tdorsey commented Apr 8, 2016

+1

I'm less concerned about the watch windows than I am the value updating in the debug console, which DOES occur in chrome. We frequently use this to quickly set flags while in development, and this is currently not possible.

@isidorn isidorn modified the milestones: April 2016, Backlog Apr 11, 2016
@aeschli aeschli modified the milestones: May 2016, April 2016 Apr 28, 2016
@isidorn isidorn modified the milestones: Backlog, May 2016 May 2, 2016
@isidorn
Copy link
Contributor

isidorn commented May 2, 2016

We are now updating the watch expressions on each evaluation in the debug repl.
However updating the variables is a bit more tricky (such that the expansion state of the tree is preserved).

@isidorn
Copy link
Contributor

isidorn commented May 3, 2016

@delmyers here's the issue I mentioned during the meeting

@isidorn
Copy link
Contributor

isidorn commented Jul 8, 2016

Discussions in #8118

Bottom line is that the variables view can be stale after evaluations. Setting this to july to investigate how to tackle this issue.

@gregg-miskelly
Copy link
Member

@isidorn you might already know this by now, but since you asked -- VS will reevaluate all watch expressions, and re-ask the backend for locals whenever:

  • An evaluation happens in the repl
  • A new watch window item is added
  • An assignment happens

@isidorn
Copy link
Contributor

isidorn commented Nov 15, 2016

VSCode is now properly refreshing the UI however node and node2 debug adapters are providing stale variables which in practice means the variables view does not get refreshed.
Though this is captured in #15520
For debug adapters that do not do caching it should work fine now.

@isidorn isidorn removed the feature-request Request for new features or functionality label Dec 6, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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
Projects
None yet
Development

No branches or pull requests

8 participants