Bug 12760 - debugger does not stop on breakpoint in a delegate of ContinueWith
Summary: debugger does not stop on breakpoint in a delegate of ContinueWith
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.7.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Joaquin Jares
Depends on:
Reported: 2013-06-19 07:16 UTC by softlion
Modified: 2017-05-22 18:14 UTC (History)
2 users (show)

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

capture of debugger breaking at the incorrect point (20.90 KB, image/png)
2013-06-19 07:16 UTC, softlion

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 softlion 2013-06-19 07:16:11 UTC
private Task<UserInfo> OfflineSync(UserInfo ui)
            const string api = "CreateUser";

            return WebApiAsync(api, "some parameters")
                     .ContinueWith(t =>
                         if (t.CheckException(api) || t.Result == null)
                             return null;

                         ... code ...
                         //BREAKPOINT HERE

                         return something;

Xamarin Android beta 4.7.9
Debugging on physical device nexus 7

the debugger breaks, but not at the correct line (debug mode), and values of variables are not accessible.
Comment 1 softlion 2013-06-19 07:16:54 UTC
Created attachment 4155 [details]
capture of debugger breaking at the incorrect point
Comment 2 Jeffrey Stedfast 2014-07-28 16:39:35 UTC
Because this is an anonymous delegate, you guys need to open up the .mdb files and figure out if there is a better match because that entire segment of code gets ripped out and the best match is at the line it stopped at.

e.g. you guys need to implement your own fuzzy matching logic like this:

Comment 3 Jeffrey Stedfast 2014-07-28 16:42:03 UTC
Er, I mean you probably need to do that with the *.pdb files (not *.mdb)
Comment 4 Jeffrey Stedfast 2014-07-28 16:45:49 UTC
Another option is to make sure that you generate the *.mdb files based on the *.pdb files and put them in the proper location so that the SoftDebuggerSession knows where to find them.
Comment 5 Joaquin Jares 2017-05-22 18:14:16 UTC
This is not a repro anymore. Marking as fixed for verification.