1

I found this solution: Debugging automatic properties

I tried to work with it, but it doesnt do anything. Does this solution to break at the setter still work?

As far as I've seen, all i have to do is creating a Breakpoint. My class has the name RecordCompetitionTitleBuilderIndividual, the Property EventData.

So I just set the Breakpoint at something like this:

RecordCompetitionTitleBuilderIndividual.set_EventData(null)

But this doesnt do anything. Am I doing something wrong, or is there a new possibility to make debugging a property happening?

Thanks and a good start in the new week!

Matthias

Community
  • 1
  • 1
Matthias Müller
  • 3,336
  • 3
  • 33
  • 65

2 Answers2

3

Just set the breakpoint for the property name (without parameter and parentheses)

RecordCompetitionTitleBuilderIndividual.set_EventData

Just checked for VS2010

Fried
  • 1,323
  • 12
  • 21
2

You can actually use IL Disassembler to find the name of the setter and getter methods to set debugger on by pressing Ctrl+B.

There are also some VS plugins that can help you make this task easier by integrating it into VS, such as Oz Code, just inspect the object instance and click on the wand thingie to set conditional breakpoint on property set: enter image description here

Stas Sh
  • 656
  • 4
  • 8