Bug 51777 - VS 2017 RC debugger doesn't hit breakpoints on iOS projects
Summary: VS 2017 RC debugger doesn't hit breakpoints on iOS projects
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.4
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2017-01-26 06:40 UTC by Andy Gocke
Modified: 2017-08-03 09:48 UTC (History)
7 users (show)

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


Attachments
Screenshot of debugger stack when breaking (137.50 KB, image/png)
2017-01-26 06:40 UTC, Andy Gocke
Details
Output from Debug pane (8.56 KB, text/plain)
2017-01-26 17:33 UTC, Andy Gocke
Details
Attached IDE logs (16.50 KB, application/x-zip-compressed)
2017-08-03 09:48 UTC, Aman Dharwal
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 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:
VERIFIED FIXED

Description Andy Gocke 2017-01-26 06:40:32 UTC
Created attachment 19483 [details]
Screenshot of debugger stack when breaking

The first, most obvious symptom of the problem is that breakpoints aren't being hit. The second comes when you break and look at the call stack: the stack frames of my app are grayed out, while the stack frames for the framework are "active". Sure enough, when I turn on "Just My Code", the stack frames from my app disappear, including the app Main method. See the attached screenshot for an example.

Version info is as follows:

```
Microsoft Visual Studio Enterprise 2017 RC
Version 15.0.26020.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Visual Basic 2017 RC   00369-50000-00000-AA859
Microsoft Visual Basic 2017 RC

Visual C# 2017 RC   00369-50000-00000-AA859
Microsoft Visual C# 2017 RC

Visual F# 4.1   00369-50000-00000-AA859
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.4.01118.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2016   15.0.21206.0
ASP.NET and Web Tools 2016

ASP.NET Web Frameworks and Tools 2013   5.2.41123.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v2.9.6   15.0.21130.0
Azure App Service Tools v2.9.6

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Continuous Delivery Tools for Visual Studio   0.1
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61124.0
Microsoft SQL Server Data Tools

TestDriven.Net   4.0-beta3
Zero friction testing for Visual Studio

TSCPackage Extension   1.0
TSCPackage Visual Studio Extension Detailed Info

TypeScript   2.1.3.0
TypeScript tools for Visual Studio

VsVim   2.1.99.99 Debug
VsVim is a Vim emulator for Visual Studio

Xamarin   4.3.0.459 (7c3dcf2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.13 (72366f7)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.4.0.33 (d93ae7e)
Visual Studio extension to enable development for Xamarin.iOS.
```
Comment 1 Andy Gocke 2017-01-26 06:42:07 UTC
Also, the Modules window is completely empty and the Disassembly window says "No disassembly available"
Comment 2 Joaquin Jares 2017-01-26 12:49:18 UTC
Andy, do you get exceptions if you force them? For instance, if you throw a NullReferenceException on any interaction? There was a bug in 2017 where the debugger will not be installed at all. In that case, you will get the behavior you describe plus exceptions will crash the app but not show in VS. If that's the case, then I can give you steps to fix locally (that's already fixed in newer builds). If it's not, I'll need to review. The first and most important thing is to get your output in the Debug Output when the app is running. Build logs should be fine too if you have them (detailed).
Comment 3 Andy Gocke 2017-01-26 17:30:09 UTC
The debugger does get break on exceptions if they are thrown and I can see the exception Instance in the locals window and examine it (look at the message, stack trace, etc.)
Comment 4 Andy Gocke 2017-01-26 17:33:16 UTC
Created attachment 19491 [details]
Output from Debug pane
Comment 5 Joaquin Jares 2017-01-27 13:34:16 UTC
Cool, then it looks like a different bug. I'll try a repro and fix. Moving to SR1.
Comment 6 Joaquin Jares 2017-07-14 18:43:41 UTC
Looking back into this, the problem seems to be that the breakpoints end up in the wrong locations in the lambdas. Is this still happening after the latest fixes (meaning, in the latest version)? I'm not being able to properly repro.
Comment 7 Andy Gocke 2017-07-20 06:01:58 UTC
Just tested this with VS 2017 15.2 (26430.16) and it no longer seems to repro. Seems to have been fixed.
Comment 8 Joaquin Jares 2017-08-01 14:45:04 UTC
Excellent, Andy, thanks. I'll mark as fixed. Please do reopen if it happens again.
Comment 9 Aman Dharwal 2017-08-03 09:48:39 UTC
Created attachment 23998 [details]
Attached IDE logs

The debugger is working fine as expected in 2017, hence this issue doesn't reproducible anymore

Environment info :  

https://gist.github.com/aman-daharwal/9f287226b1ce04e6ffa03c559e6106b3

Screencast link : https://www.screencast.com/t/AGPbX9E9C0Zx