Bug 9433 - Breakpoint not hit when disable fastdebug and linking sdk assemblies only
Summary: Breakpoint not hit when disable fastdebug and linking sdk assemblies only
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.4.x
Hardware: PC Windows
: High normal
Target Milestone: 4.8 (async)
Assignee: dean.ellis
URL:
: 10592 10678 10926 ()
Depends on:
Blocks:
 
Reported: 2013-01-09 17:25 UTC by Luzanne
Modified: 2014-05-12 18:21 UTC (History)
16 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 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:
VERIFIED FIXED

Description Luzanne 2013-01-09 17:25:43 UTC
It's possible to set breakpoints, but they are not hit when you are debugging your application.

It's reproducable in VS2010 and VS2012 on Windows 7 x64, all with the latest MonoDroid version 4.4.54. Doesn't matter if you're using a device or emulator.

Steps to reproduce:
1. Create a new project 'Android application' in Visual Studio. Make sure that Fast Debugging is enabled and the Linking is set to 'None'.
2. Set a breakpoint in the default app, for example the line with SetContentView and debug the app on device or emulator. You'll see that the debugger breaks at the breakpoint. There is also a message in the output:

Resolved pending breakpoint at 'c:\Users\User\Documents\Visual Studio 2012\Projects\DebugTest\DebugTest\Activity1.cs:22' to Void DebugTest.Activity1:OnCreate (Bundle) [0x00016].

4. Stop debugging, go to the project properties and disable Fast Debugging and set the Linking to 'SDK assemblies only'.
5. Run the app again on device or emulator. You'll see that the debugger did not break at the breakpoint. There is no message in the output about resolving pending breakpoint.
Comment 1 dean.ellis 2013-02-13 11:12:14 UTC
This bug only seems to happen if fast Deployment is switched off. I have managed to get breakpoints to happen with the Linking set to SDK assemblies.
Comment 2 dean.ellis 2013-02-15 14:00:47 UTC
Fixed in master/cfde8c003e
Comment 3 dean.ellis 2013-02-25 11:33:30 UTC
*** Bug 10592 has been marked as a duplicate of this bug. ***
Comment 4 Jatin 2013-03-06 04:00:35 UTC
Today, we have verified this issue with the latest builds:

Xamarin Studio-4.0.2.1
MFA 4.6.01046
Mono Framework 2.10.11

And we have observed that the issue still exists, as still the Breakpoint does not hit, when disable fast dev and link sdk assemblies only.

Below is the screencast for the same:
http://www.screencast.com/t/rMe7KBAgql

Hence, reopening this issue.
Comment 5 dean.ellis 2013-03-06 08:24:23 UTC
I have tested this with MFA 4.6.01045 and it worked in Visual Studio 2012. 
I will install 01046 and see if the problem occurs then. 

Can you take a look at the .apk files that are generated as part of the build when fastdev is switched off, do they contains the .mdb files in the assemblies folder?
Comment 6 dean.ellis 2013-03-06 09:38:15 UTC
I have tested with MFA 4.6.01046 and it worked. 

You need to make sure you rebuild the project, as just changing the setting will not cause the .apk to get re-generated as none of the project files have changed.

I have confirmed that the .mdb files do get packaged with the debug builds of the application in the .apk.
Comment 7 dean.ellis 2013-03-06 13:49:42 UTC
*** Bug 10678 has been marked as a duplicate of this bug. ***
Comment 8 Jeremy Kolb 2013-03-06 14:44:18 UTC
Where do I get 4.6.01046?  All of my channels appear to be up to date.
Comment 9 PJ 2013-03-06 16:13:14 UTC
Hi jkolb, 

4.6.01046 is a build currently in test. 

4.6.1 will be released to the beta channel at the end of the release cycle and will contain the fix. To be sure to catch this when it's released for the first time, set your updater to check for Beta updates.

Thanks for asking!
Comment 10 dean.ellis 2013-03-07 07:39:15 UTC
*** Bug 10926 has been marked as a duplicate of this bug. ***
Comment 11 Jatin 2013-03-07 07:54:53 UTC
Today with the latest builds:

Xamarin Studio 4.0.2.13
MFA 4.6.01055
VS 2012/2010

We are still experiencing this issue, as still the Breakpoint does not hit, when disable fast dev and link sdk assemblies only.

Below is the screencast for the same Using XS:
http://www.screencast.com/t/RzX2tU8eRZnR

This is appearing on VS as well as on XS

And on Mac as well as on Windows.

Hence, reopening this issue.
Comment 12 dean.ellis 2013-03-07 09:02:09 UTC
ok looks like the .mdb is not included when you turn SDL linking on, but it does when No linking is specified.
Comment 13 dean.ellis 2013-03-15 05:59:01 UTC
Issue with debug information not being included when linking is turned on is fixed in master/d7eb59ad20
Comment 14 Jatin 2013-03-20 05:17:11 UTC
Today, we have verified this issue with the latest builds:

XS 4.0.2.22
MFA 4.6.01073
Mono 2.10.12
VS 2012/2010

And we have observed that the issue still exists, as after applying breakpoint and changing the project properties such as: 
1. Link SDK Assemblies only
2. Uncheck the option Fast Deployment 

When we debug any MFA application, the breakpoint does not hit.

We verified this issue as it was appearing in the Verified these bugs list.

PJ please look into it and let us know if these are the correct builds we referred, so that we may reopen it.
Comment 15 dean.ellis 2013-03-20 05:34:36 UTC
Can you screen cast the entire test please so we can see what steps you are taking so we can replicate the scenario exactly.
Comment 16 Mohit Kheterpal 2013-03-20 12:57:14 UTC
Today, we have verified this issue with the latest builds:

XS 4.0.2.22
MFA 4.6.01073
Mono 2.10.12
VS 2012/2010
MTVS 1.1.188

When we debug any MFA application, the breakpoint does not hit.
When we change project properties :
1. Uncheck the option Fast Deployment
2. Link SDK Assemblies only 

This issue still exist, hence reopening this issue.

Below is the screencast for the same :
http://www.screencast.com/t/3dGmtd4wsJn
Comment 19 Mohit Kheterpal 2013-07-09 07:51:03 UTC
Regression Status : Not Regression. This issue also exist with stable 
X.Android 4.6.08007 on window and Mac.
Comment 20 PJ 2013-07-09 11:57:03 UTC
Is the issue occurring on master? (4.7.x test builds?)
Comment 21 Mohit Kheterpal 2013-07-09 12:05:03 UTC
Today we have checked this issue on following builds :

XS 4.0.9 (build 15)
X.Android 4.7.110042

This is working fine, We are able to hit breakpoint without fast dev and with link sdk. Hence closing this issue.
Comment 22 Felix Collins 2014-05-11 23:39:14 UTC
I'm experiencing this with an LG G2 4.4.2 device. 

fastdeploy on = breakpoints work
fastdeploy on = breakpoints do not get hit



Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

Visual C# 2012   04938-004-0033001-02762
Microsoft Visual C# 2012

Xamarin for Visual Studio   1.12.278.0 (b3acb09afda91828e5bd48308ac8e7433d30f330)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android

Xamarin.Android   4.12.3.3 (7f0e3d3cfb9b36570e8d7862a33d0310238c814d)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   1.12.278.0 (b3acb09afda91828e5bd48308ac8e7433d30f330)
Visual Studio extension to enable development for Xamarin.iOS
Comment 23 PJ 2014-05-12 18:14:26 UTC
Hi Felix, I think there was a typo here, can you clarify?

> fastdeploy on = breakpoints work
> fastdeploy on = breakpoints do not get hit

Also, if the behavior does not match the original bug description, please consider opening a new bug. This bug is about the combination of fast deploy and the linker setting  'Link SDK'. If you're seeing a discrepancy while isolating fast-deploy, that is a different issue.

If so, please file a new bug. Thanks!
Comment 24 Felix Collins 2014-05-12 18:21:33 UTC
Woops... fastdeploy *off* = brakpoints do not work. I am indeed linking SDK's only but have not tested this variable so it may be a new bug or the same thing. I'll open a new ticket. Would a sanitised version of the project file to show the config be useful?