Bug 13401 - [CorDebugger] Unable to inspect variable in async methods using breakpoints in a .NET Console project
Summary: [CorDebugger] Unable to inspect variable in async methods using breakpoints i...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 4.0.10
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: David Karlaš
URL:
Depends on:
Blocks:
 
Reported: 2013-07-22 21:07 UTC by Timothy Risi
Modified: 2014-05-05 16:34 UTC (History)
4 users (show)

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


Attachments
Sample code (13.40 KB, application/x-zip-compressed)
2013-07-22 21:07 UTC, Timothy Risi
Details


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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Timothy Risi 2013-07-22 21:07:43 UTC
Created attachment 4396 [details]
Sample code

Case 1:

Steps to Reproduce:
1.  Set a breakpoint on line 27 of Program.cs - 'Console.WriteLine(s);'
2.  Debug the program
3.  When the debugger breaks at the line, hover over the variable s to inspect it's value

Expected Result: s has a value of "Hello from Bar"

Actual Result: Hovering over 's' displays "string s", local variables has no variable s, and if s is set as a Watch variable, it displays as "The name 's' does not exist in the current context".

Inspection works fine in non-async methods, for instance breaking on line 17 and inspecting the value of z after the call to 'int z = BarMath(1).Result'
Comment 1 Jeffrey Stedfast 2013-07-23 12:00:59 UTC
Looks like the CorDebugger needs to include hoisted variables in the locals
Comment 2 Marius Ungureanu 2013-09-08 07:43:20 UTC
Aside from having to step multiple times (will fix this), this issue is fixed and will be included in future releases.
Comment 3 Sadik Ali 2014-03-31 05:56:53 UTC
I have verified this issue. I debug attached project and followed steps mentioned in bug description and noticed that when I am mouse hovering over 's' getting same Actual result as mentioned in bug description.

Screen cast: http://screencast.com/t/oVDwDl0hC

Hence I am reopening this issue.

Build Info: 

=== Xamarin Studio ===
Version 4.2.4 (build 266)
Installation UUID: 400bab6b-f5cd-4e84-a1d1-39f9d6414cb1
Runtime:
 Microsoft .NET 4.0.30319.18449
 GTK+ 2.24.22 (MS-Windows theme)
 GTK# 2.12.25

=== Build Information ===
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

=== Operating System ===
Windows 6.2.9200.0 (64-bit)
Comment 4 David Karlaš 2014-05-05 16:34:55 UTC
This is fixed on master.