|
|
Title | Use the DebuggerStepThrough attribute in VB .NET |
Description | This example shows how to use the DebuggerStepThrough attribute in VB .NET. |
Keywords | DebuggerStepThrough, attribute, VB.NET, property |
Categories | VB.NET |
|
|
The DebuggerStepThrough attribute tells the Visual Basic debugger to step through the entrie method when the user steps by pressing F8 or Shift-F8. However, the debugger will stop at breakpoints that you set in the code.
In this example, the debugger will stop at breakpoints in subroutine NoStepthrough but will not let you step through it one line at a time. Subroutine CanStepthrough lets you step through the code normally.
|
|
Private Sub btnGo_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnGo.Click
NoStepthrough()
CanStepthrough()
End Sub
<DebuggerStepThrough()> _
Private Sub NoStepthrough()
' Try setting a breakpoint in this routine
' and then stepping from there.
Dim i As Integer
i = 1
i = 2
i = 3
End Sub
Private Sub CanStepthrough()
' Try setting a breakpoint in this routine
' and then stepping from there.
Dim i As Integer
i = 1
i = 2
i = 3
End Sub
|
|
|
|
|
|