Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 52605 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Similar to original bug 35858 - VS2015 does not show contents of local variables during debug
I have 're-found' this issue with latest Xamarin.Forms and Visual Studio 2015 Update 3.
Seems to only affect UWP apps (I am able to evaluate and debug all locals properly in iOS, for instance).
Most locals are just showing a blank name in the locals window, but with proper values. When trying to QuickWatch the variable, I get a CS0103 The name 'xxx' does not exist in the current context. Watch window reflects the same error as QuickWatch.
Xamarin - 188.8.131.52-cycle8+00fa5cc
Moving to Forms, to get visibility from the Xamarin.Forms team.
I have this problem too in my pcl project.
It happens to me when I create a xamarin cross platform pcl project.
Debugging from android, I can see local variables in async methods.
Debugging from UWP i cannot see any local variables in async methods in pcl projects ("The name 'xxx' does not exist in the current context").
Also creating a unit test project, i cannot see any local variables in async methods in pcl projects.
After some tests, I have found whats cause the problem:
if I remove
from all views inside pcl project, I can see local variables.
as workaroung i use this directive:
so when I compile for release, I can still use xamlcompilation, but during debug I can see local variables!
I could confirm the issue. Most of the local variables names are just blank, but they have the proper values set. When i try to use the QuickWatch with a variable, I get a CS0103 The name 'xxx' does not exist in the current context.
The issue affects UWP apps.
Disabling [XamlCompilation(XamlCompilationOptions.Compile)] fixes the issue.
Visual Studio Version 4.6.01586 Update 3
Started trying to port my XF Android App to UWP on VS2017 and running into a couple of debugging issues including this one.
VS 2017 v15.1 (26403.0) Release
Xamarin 184.108.40.206 (3f99c5a)
Created a new solution using the Cross Platform App (Xamarin.Forms or Native) -> Master Detail (UI Technology = Xamarin.Forms), PCL, Host in the cloud.
All I did in the solution was create the following class:
public class AsyncTest
public async Task HitBreakpoint()
// Breakpoint does not get hit and is listed as:
// The breakpoint will not currently be hit.
// No symbols have been loaded for this document.
var foo = 0;
and referenced it in the boilerplate App class as follows:
public partial class App : Application
//MUST use HTTPS, neglecting to do so will result in runtime errors on iOS
public static bool AzureNeedsSetup => AzureMobileAppUrl == "https://CONFIGURE-THIS-URL.azurewebsites.net";
public static string AzureMobileAppUrl = "https://App220170406015956.azurewebsites.net";
public static IDictionary<string, string> LoginParameters => null;
// Made method async
public async static void SetMainPage()
// Breakpoint here gets hit sometimes
// Other times this breakpoint mysteriously moves to the UWP App.xaml.cs class
// even though I did not set a breakpoint there
await new AsyncTest().HitBreakpoint();
etc, etc ...
Spent a couple of days researching but remain unsuccessful. Resorting to Debug statements for now. Happy to help if you need more info.
I'm having the same issue with UWP using Visual Studio 2017 (latest as of today). Just uninstalled and reinstalled VS2017 and the problem was not resolved. Needless to say, not being able to locals is a big issue in terms of debugging.
Created attachment 23010 [details]
I can reproduce the following on 2.3.4 on VS2017:
All breakpoints work with xamlc on and off..
The only difference i can see is on the locals tab, with xamlc OFF i can see foo and bar as locals, with xamlc ON i can only the bar variable and not the foo one.
*** Bug 47951 has been marked as a duplicate of this bug. ***
I seeing in the same issue when debugging UWP app in a Xamarin Forms solution. I using
Visual Studio 2017 version 15.2 (26430.14)
Issue seems to happen when debugging async functions and I had no XamlCompilation attribute defined in any of my views. However, as I was using a Xamarin Forms Prism template solution, then the workaround was to remove XamlCompilation from the AssemblyInfo.cs file.