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
GitHub or 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.
Setting a breakpoint in an object initializer does not work, the breakpoint never gets hit.
var user = new User()
["breakpoint"] Name = "My Name", // Breakpoint does not get hit
Age = 12,
So the problem here seems to be that the soft-debugger doesn't have a location listed for any of the initializer lines (closest match would be the "var user = new User ()" line)
This means that MonoDevelop doesn't have the info available to figure out the correct location to set the breakpoint.
This is either a soft-debugger bug or a compiler bug for not injecting the needed info.
As usual, this is an mcs problems. For this code:
11 public static void Main ()
13 var user = new A()
15 Name = "My Name", // Breakpoint does not get hit
It generates the following line number table:
IL0 -> 12
IL0 -> 13
IL13 -> 17
IL13 -> 17
With HEAD, you can run md with MONO_SDB_ENV_OPTIONS=loglevel=10 to have sdb dump its line number tables in the application output window.
Fixed in master