How to prevent the debugger from calling some source code when paused?

☆樱花仙子☆ 提交于 2019-12-05 22:51:31

I found a solution here. Decorate your problem properties with the DebuggerBrowsable attribute.

[DebuggerBrowsable(DebuggerBrowsableState.Never)]

Ideally you'd never need to do this. However, we have some properties that trigger a code contract exception when evaluated (in debug), which causes Visual Studio to get very confused. You probably need to decorate both the property on the class and any interface it implements.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!