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

Can't update the presentationHint of a Source during a debug session #42139

Closed
roblourens opened this issue Jan 25, 2018 · 8 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Start debugging with the node2 or chrome debugger
  • Right click on a stack frame, "toggle skipping this file"
  • The debug adapter will now send the opposite presentation hint for the stackFrame.source (if it was not skipped, it will now send "deemphasize". If it was skipped, it will stop sending "deemphasize")
  • But the stack frame view is not updated - it still appears with the original presentationHint

Looking at the code, it seems like the Source is cached by id, and the presentationHint is never updated, even if the debug adapter sends a Source with a different presentationHint. This must have changed at some point.

@roblourens roblourens added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 25, 2018
@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Jan 25, 2018
@isidorn isidorn added this to the January 2018 milestone Jan 25, 2018
@isidorn
Copy link
Contributor

isidorn commented Jan 25, 2018

@roblourens please let me know if my fix solves this issue.
Now I simply override the raw source data whenever I get a new raw source from the adapter.
Not sure if this is the best strategy. Feedback welcome

@roblourens
Copy link
Member Author

That should work for my adapter, and I think it makes sense. I don't know if anyone else is depending on vscode caching some Source properties. But I guess they shouldn't be.

@weinand
Copy link
Contributor

weinand commented Feb 2, 2018

After toggling a stackframe for the first time it correctly updates to a dimmed presentation.
But toggling the stackframe again doesn't result in the original presentation.

@weinand weinand reopened this Feb 2, 2018
@weinand weinand added the verification-found Issue verification failed label Feb 2, 2018
@isidorn
Copy link
Contributor

isidorn commented Feb 2, 2018

Strange, because I take the priority of the incoming source object.

@isidorn isidorn modified the milestones: January 2018, February 2018 Feb 2, 2018
@isidorn
Copy link
Contributor

isidorn commented Feb 23, 2018

@weinand good catch. This was not working because I was merging whatever was coming in with what I already had. And when you toggle back the source to be shown it does not have any presentationHint since it is back to normal. However with my merge stragety the old presentationHint would not get updaed. Now I always override the presentationHint with whatever I get from the adapter

@ramya-rao-a ramya-rao-a removed the verification-found Issue verification failed label Mar 2, 2018
@bpasero
Copy link
Member

bpasero commented Mar 6, 2018

I assume this is now correct after invoking the action:

image

@bpasero bpasero added the verified Verification succeeded label Mar 6, 2018
@isidorn
Copy link
Contributor

isidorn commented Mar 6, 2018

Yeah, but after you invoke it again module.js should no longer be dimmed

@bpasero
Copy link
Member

bpasero commented Mar 6, 2018

@isidorn yeah that is what I saw

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants