C # Debug Attribute

Is there an attribute that I can specify for a method, so when I debug, does the debugger know that I need to intervene inside the method? I override the Databind () method, and the debugger is currently executing it automatically.

+3
source share
4 answers

Just put a breakpoint inside the method you want to debug.

If the breakpoint is not deleted during debugging, this means that the method is not called - are you sure that you overcame it correctly?

+4
source

, , , . , , . System.Diagnostics , , DebuggerStepThrough() DebuggerHidden().

    // Force the debugger to step through this code
    [DebuggerStepThrough()]
    public double GrandTotal
    {
        get
        {
            return (this.Subtotal + this.Tax + this.Shipping);
        }
    }

...

    // Force the debugger to skip step through
    [DebuggerHidden()]
    public double GrandTotal
    {
        get
        {
            return (this.Subtotal + this.Tax + this.Shipping);
        }
    }

: Oded , , :) , ?

+2

Oded, Debugger.Break(). , , , .

+1

VS ? , , " | ", " node: ( )" - , " .NET Framework Stepping" - .

?

0

All Articles