You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugger/get-started-with-breakpoints.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ To set a breakpoint in source code:
45
45
46
46
- Click in the far left margin next to a line of code. You can also select the line and press **F9**, select **Debug** > **Toggle Breakpoint**, or right-click and select **Breakpoint** > **Insert breakpoint**. The breakpoint appears as a red dot in the left margin.
47
47
48
-
For most languages, including C#, Visual Studio automatically highlights breakpoint and current execution lines. For C++ code, you can turn on highlighting of breakpoint and current lines by selecting **Tools** (or **Debug**) > **Options** > **Debugging** > **Highlight entire source line for breakpoints and current statement (C++ only)**.
48
+
For most languages (including C#), Visual Studio automatically highlights breakpoint and current execution lines. For some languages, such as C++, which isn't highlighted by default, you can turn on highlighting of breakpoint and current lines by selecting **Tools** (or **Debug**) > **Options** > **Debugging** > **Highlight entire source line for breakpoints and current statement (C++ only)**.
49
49
50
50
::: moniker range=">= vs-2022"
51
51

@@ -54,6 +54,8 @@ For most languages, including C#, Visual Studio automatically highlights breakpo
54
54

55
55
::: moniker-end
56
56
57
+
To debug, press **F5** or select **Debug** > **Start Debugging**.
58
+
57
59
When you debug, execution pauses at the breakpoint, before the code on that line is executed. The breakpoint symbol shows a yellow arrow.
58
60
59
61
::: moniker range=">= vs-2022"
@@ -70,6 +72,12 @@ At the breakpoint in the following example, the value of `testInt` is still 1. S
70
72
71
73
When the debugger stops at the breakpoint, you can look at the current state of the app, including [variable values](../debugger/debugger-feature-tour.md#inspect-variables-with-data-tips) and the [call stack](../debugger/how-to-use-the-call-stack-window.md).
72
74
75
+
::: moniker range=">= vs-2022"
76
+
For example, in the following illustration, you can see the value of `testInt` in a datatip and in the **Locals** window.
77
+
78
+

79
+
::: moniker-end
80
+
73
81
Here are a few general instructions for working with breakpoints.
74
82
75
83
- The breakpoint is a toggle. You can click it, press **F9**, or use **Debug** > **Toggle Breakpoint** to delete or reinsert it.
0 commit comments