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 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.
Debugging from within VS2012 and put a breakpoint on a line within a specific unit. Run the app, tap a button to run the code, debugger breaks at the end of the unit. Call stack has a huge line number and the wrong method name (the breakpoint is in a different method).
Happens for a specific .cs file, not in others. First noticed it however in a different unit when I had a breakpoint on an inline delegate method:
// Not real code :)
foo.Tapped += delegate
// Breakpoint in here would break at the end of the unit
Moved the above code into its own method and that works. Not ideal though.
Can you provide a full test case which demonstrates the issue (a zipped project would be fine)?
I'll try, I don't want to send the unit that has the issue though. Will see if I can replicated with a Hello World app.
Possible duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=12286
As per the possible duplicate linked above:
I have seen issues with anon delegates too, where the breakpoint fires at the time the delegate is assigned or not at all, but it never in the delegate itself. Workaround, create a method and and assign that as the delegate.
Created attachment 4206 [details]
Got an example that behaves badly when debugging and stepping through code.
Load the solution in VS2012.
Put a breakpoint on line 46 in MyViewController.cs, run the example, tap the button.
F10 all the way through the for each, it will loop 4 times. Keep F10 and you will see the current break line move beyond the end of the file, F10 again and it is back, F10 again off the end of the file etc etc.