Skip to content

Commit bc7add1

Browse files
authored
Update using breakpoints
Add instructions on how to add function breakpoints
1 parent 65f9864 commit bc7add1

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

docs/debugger/using-breakpoints.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,32 @@ You can set breakpoints when you want to stop debugger execution, perhaps to see
6060

6161
You can set a breakpoint on any line of executable code. For example, in the C# code above you can set a breakpoint on the variable declaration, the `for` loop, or any code inside the `for` loop, but you cannot set a breakpoint on the namespace or class declarations or the method signature.
6262

63-
## <a name="BKMK_Set_a_breakpoint_in_a_source_file"></a> Setting Other Kinds of Breakpoints
63+
## <a name="BKMK_Set_a_breakpoint_in_a_source_file"></a> Setting a function breakpoint
64+
You can break execution when a function is called.
65+
66+
1. Open the **Breakpoints** window and choose **New > Function Breakpoint**.
67+
68+
2. Enter a function name in the **Function Name** box.
69+
70+
> [!NOTE]
71+
> To narrow the function specification:
72+
>
73+
> Use the fully qualified function name.
74+
> Example: Namespace1.ClassX.MethodA()
75+
>
76+
> Add the parameter types of an overloaded function.
77+
> Example: MethodA(int, string)
78+
>
79+
> Use the '!' symbol to specify the module.
80+
> Example: App1.dll!MethodA
81+
>
82+
> Use the context operator in native C++.
83+
> {function, , [module]} [+&lt;line offset from start of method&gt;]
84+
> Example: {MethodA, , App1.dll}+2
85+
86+
3. In the **Language** dropdown, choose the specific language of the function you want to break on.
87+
88+
## <a name="BKMK_Set_a_breakpoint_in_a_function"></a> Setting Other Kinds of Breakpoints
6489
You can also set breakpoints in the call stack, in the Disassembly window, and, in native C++ code, at a data condition or a memory address.
6590

6691
## <a name="BKMK_Set_a_breakpoint_in_the_call_stack_window"></a> Setting a Breakpoint in the Call Stack Window

0 commit comments

Comments
 (0)