Bug 29861 - latest pre-release screws up breakpoint debugging
Summary: latest pre-release screws up breakpoint debugging
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-05-07 16:52 UTC by George Cook
Modified: 2015-06-29 14:24 UTC (History)
12 users (show)

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 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:

Description George Cook 2015-05-07 16:52:42 UTC
the release note states that we can expect to see undefined debugger behaviour when using xaml compilcaiton; but says that this is not activated by default.

however, I find it breaks debugging in any case.

I just verified this by doing the following.

deleted all folders from my packages folder
set the package.config back to point at

clean, rebuild.
breakpoints work. 

I then delete the package folders, put the package folders back, and set the packages.configs to poitn at again.

clean, rebuild, and find that breakpoints are broken again.
Comment 1 tim.ahrentlov 2015-05-08 05:56:33 UTC
I see the same thing
Comment 2 Jason Smith [MSFT] 2015-05-13 17:58:12 UTC
We are not sure what is causing this to happen, we are working with the debugger teams to figure it out.
Comment 3 Jason Smith [MSFT] 2015-05-13 18:00:46 UTC
It should be noted we are seeing the debugger breakage even when we entirely remove XamlC from the source code and recompile.
Comment 4 Chris 2015-05-17 07:24:01 UTC
I also had the same problem. I had to revert to Xamarin Forms 1.4.2 to get breakpoint debugging to work properly.
Comment 5 Kasper 2015-05-30 12:04:56 UTC
I don't use Xaml at all, but I still see this issue. 

I'm mostly focusing on Android, and I notice that the issue only happens in the PCL projects in my solution, whereas break-points works fine in the Android project itself. 

I can even update to XF in the Android project, but I have to keep XF if I wan't break-points to keep working in the PCL projects.
Comment 6 Jon Goldberger [MSFT] 2015-06-01 16:25:19 UTC
I have been able to reproduce this issue exactly as described by Kasper in comment 5.

I did make another observation that might be useful. A breakpoint placed in the PCL project's App class constructor WAS hit when on the pre2 release of Xamarin Forms in the PCL project. However breakpoints placed in the constructor for the initial page and/or in event handlers used on that initial page are _not_ hit. 

Downgrading to Forms version in the PCL project alone allowed all breakpoints to be hit. 

## My environment info (Current Beta channel as of today):

=== Xamarin Studio ===

Version 5.9.2 (build 2)
Installation UUID: 2dc9022f-f9a8-424f-8284-bf224cbbfde0
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/apple/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 509020002
Git revision: 43735a4b905b571f69cf9428a3ea7b52aef55476
Build date: 2015-05-18 09:38:12-04
Xamarin addins: ab18ddff45f507ed74f36c2b65df9aee22e28a56

=== Operating System ===

Mac OS X 10.10.3
Darwin Jons-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 7 Kasper 2015-06-03 10:23:12 UTC
I just re-tested after upgrading to Xamarin Studio Version 5.9.2 (build 4). The issue still exists.
Comment 8 George Cook 2015-06-03 10:25:58 UTC
I don't believe this is a Xamarin Studio issue. The issue goes away in all versions of XS that I use (5.8 or 5.9) if you revert to forms 1.4.2.

The forms release note itself states that they have a new fangled xamlc compilers (Whcih sounds awesome btw!) which results in this exact behaviour. It's meant to be off, but sounds like that doesn't happen.

I'm actually going to raise another issue to make it easy to toggle that settings, as it sounds like it will be a pita for those of us who have large projects, having to flick xamlc on and off whenever we want to debug something.
Comment 9 Kasper 2015-06-03 11:24:25 UTC
I don't believe either, but it was a trivial test. On the other hand I'm a bit wary that xamlc should be involved, since I don't use xaml at all in my project.
Comment 10 Reinhard Sual 2015-06-08 13:35:35 UTC
I have this problem solved on IOS, but still have this issue on Android (breakpoint never hit).

Try to manually delete the Bin/obj folder, it works once! But after that the issue comeback again (even after manually delete both folder).

I am using:
* VS 2013 update 4
* Xamarin 3.11.586.0
* Android
* Forms

Other Info:

Really need the solution badly!
Comment 11 Kasper 2015-06-09 03:38:48 UTC
In comment #5 I said that it was enough to downgrade the PCL projects from XF I have just learned that was wrong. I ran into breakpoint woes
in the Android project as well, and again I could solve it by downgrading to XF I'm not sure if this helps you.
Comment 12 George Cook 2015-06-11 12:37:16 UTC
This is a major issue for us.

We have a release coming up in 2 weeks, and we will likely miss our Android release, as we need 1.4.3 as there's a NPE you guys fixed in 1.4.2. It's totally impossible to debug the application, and we can't run with 1.4.2 - we're basically completely halted on Android.
Comment 13 Kasper 2015-06-12 04:29:25 UTC
@MichaelWatson made a comment yesterday on the forum thread https://forums.xamarin.com/discussion/38729/xamarin-forms-1-4-3-pre2-released#latest
that this should be fixed in the latest alpha release, ie. 

Xamarin Studio - Version 5.9.4 (build 5)
Mono 4.0.2 ((detached/198235d)
Xamarin.Android - Version:

This is _NOT_ my experience. I tried to roll forward to XF after installing the latest alpha, but once I did break points in PCLs stop working again.
Comment 14 Jason Smith [MSFT] 2015-06-15 17:51:49 UTC
The issue in Xamarin.Forms that could cause this is fixed in the next release. If you *still* have issues please file against XS or VS.
Comment 15 George Cook 2015-06-15 18:17:18 UTC
I heard that release is today? if not, when? how can we get better vis on when releases will come, or what will be in them?

We don't even get a ball-park impression as to what's happening. It makes client management very hard.
Comment 16 Parmendra Kumar 2015-06-29 14:24:41 UTC
I have checked this issue with Xamarin.Forms and observed that now breakpoint hits successfully for PCL project. 

Hence closing this issue.

If anyone getting same issue then please filed a separate bug.