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 ...
Status: CONFIRMED
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š
URL:
Depends on:
Blocks:
 
Reported: 2013-07-03 10:50 UTC by Simon Lindgren
Modified: 2016-10-13 17:25 UTC (History)
2 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 13038 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

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