How Do I: Create a Breakpoint Using Conditions? [C# Express]

后端 未结 3 1277
孤城傲影
孤城傲影 2021-01-02 22:10

I\'ve been seeing this in my Visual C# 2008 RSS Feed forever now:

http://lincolnfair.net/oldLincolnFair/mad.jpg

I\'m pretty sure this is a VS 2010 only featu

3条回答
  •  隐瞒了意图╮
    2021-01-02 22:19

    The other way to do this is make your own conditions and use a call to:

    System.Diagnostics.Debugger.Break(); 
    

    While it may not be as sophisticated as the VS2010 way of setting breakpoints, you can get the same effect with minimal code overhead. Just remember to take that stuff out when you build release code.

    Note: In VS2008 and VS2005, you can set a conditional breakpoint by setting a regular breakpoint (F9 or double click in gutter), and then right clicking on that breakpoint to set the "condition...". The ability to set conditional breakpoints is NOT available in the VS2008 Express Edition.

提交回复
热议问题