Bug 13038 - Debugger shows tooltips for variables in current stack frame even though the stack frame is for a different method
Summary: Debugger shows tooltips for variables in current stack frame even though the ...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: Trunk
Hardware: All All
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: David Karlaš
Depends on:
Reported: 2013-07-03 10:50 UTC by Simon Lindgren
Modified: 2016-10-13 17:25 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Simon Lindgren 2013-07-03 10:50:16 UTC
Hovering a variable name while in paused mode shows the value of that variable name if there is such a variable in the current stack frame.

Steps to reproduce:
1. Start debugging.
2. Pause execution.
3. Move to a different file.
4. Hover a variable with the same name as one of the variables in the current stack frame.

Actual behavior:
The value of the variable is shown, as if the current stack frame belonged to that piece of code.

Expected behavior:
Something else. Perhaps the tooltip used when not debugging should be shown, so I can see the inferred type of the variable. This was what I wanted when I noticed this at least :)
Comment 1 Mikayla Hutchinson [MSFT] 2013-07-08 17:50:01 UTC
The debugger could fix this by being smarter about the local resolve results it gets back from the editor's resolver.

The simple fix would be to check the resolve result's method, and if it's not the current selected frame's method (or if the current frame is anonymous, the parent frame's method, etc), skip value resolution. Similarly, for member resolve results it would check that the type was the current frame's type. It would then be more accurate, but not as helpful as it could be.

A more advanced solution might be to search all threads' stacks and find a frame executing that method/type, then resolve the local/member from that frame. Obviously if multiple frames were executing that method, it would prefer the selected frame, or the frame closest to it, and if multiple threads were executing the method it would prefer the selected thread.
Comment 2 iain 2016-10-13 17:25:17 UTC
This is still an issue on Xamarin Studio 6.2

Note You need to log in before you can comment on or make changes to this bug.