Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio DebuggerStepThrough for Property Setter

I do not want to disable Visual Studio's normal handling of all exceptions. I am looking for a way to ignore the exceptions raised by the setter of a specific property. I am aware of [DebuggerNonUserCode] and [DebuggerStepThrough], but they don't seem to be applicable to properties, or more specifically setters.

Is this possible?

like image 758
Kyeotic Avatar asked Sep 01 '11 16:09

Kyeotic


1 Answers

I believe the problem you're running into is you're attempting to apply the attribute to the property instead of the individual accessors. The accessors are the actual methods and where the attribute needs to go. For example

int Property {
  [DebuggerNonUserCode]
  get { ... }
  [DebuggerNonUserCode]
  set { ... }
}
like image 109
JaredPar Avatar answered Sep 22 '22 19:09

JaredPar