Skip to content

Commit 0efb796

Browse files
authored
Merge pull request #1585 from MicrosoftDocs/FromPublicMaster
Confirm merge from FromPublicMaster to master to sync with https://github.com/MicrosoftDocs/visualstudio-docs (branch master)
2 parents 2a07244 + 64b3fc3 commit 0efb796

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

docs/debugger/using-breakpoints.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,31 @@ 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+
To narrow the function specification:
71+
72+
Use the fully qualified function name.
73+
Example: Namespace1.ClassX.MethodA()
74+
75+
Add the parameter types of an overloaded function.
76+
Example: MethodA(int, string)
77+
78+
Use the '!' symbol to specify the module.
79+
Example: App1.dll!MethodA
80+
81+
Use the context operator in native C++.
82+
{function, , [module]} [+&lt;line offset from start of method&gt;]
83+
Example: {MethodA, , App1.dll}+2
84+
85+
3. In the **Language** dropdown, choose the specific language of the function you want to break on.
86+
87+
## <a name="BKMK_Set_a_breakpoint_in_a_function"></a> Setting Other Kinds of Breakpoints
6488
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.
6589

6690
## <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)