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/quickstart-debug-with-cplusplus.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The Visual Studio debugger provides many powerful features to help you debug you
18
18
19
19
1. Open Visual Studio and create a project.
20
20
21
-
If the Start window is not already open, select **File > Start Window**. In the Start window, select **Create a new project**. In the search box, type "Empty project", and then select the C++ **Empty Project** template.
21
+
If the Start window isn't already open, select **File > Start Window**. In the Start window, select **Create a new project**. In the search box, type "Empty project", and then select the C++ **Empty Project** template.
22
22
23
23
If you don't see the project template, open the **Visual Studio Installer**. Choose the **Desktop development with C++ workload**, then choose **Modify**.
24
24
@@ -35,7 +35,7 @@ The Visual Studio debugger provides many powerful features to help you debug you
35
35
}
36
36
```
37
37
38
-
with this code (do not remove `#include "stdafx.h"`):
38
+
with this code (don't remove `#include "stdafx.h"`):
39
39
40
40
```cpp
41
41
#include <list>
@@ -66,7 +66,7 @@ The Visual Studio debugger provides many powerful features to help you debug you
66
66
67
67
## Set a breakpoint
68
68
69
-
A *breakpoint* is a marker that indicates where Visual Studio should suspend your running code so you can take a look at the values of variables, or the behavior of memory, or whether or not a branch of code is getting run. It is the most basic feature in debugging.
69
+
A *breakpoint* is a marker that indicates where Visual Studio should suspend your running code so you can take a look at the values of variables, or the behavior of memory, or whether or not a branch of code is getting run. It's the most basic feature in debugging.
70
70
71
71
1. To set the breakpoint, click in the gutter to the left of the `doWork` function call (or select the line of code and press **F9**).
72
72
@@ -76,7 +76,7 @@ A *breakpoint* is a marker that indicates where Visual Studio should suspend you
76
76
77
77

78
78
79
-
The debugger pauses where you set the breakpoint. The statement where the debugger and app execution is paused is indicated by the yellow arrow. The line with the `doWork` function call has not yet executed.
79
+
The debugger pauses where you set the breakpoint. The statement where the debugger and app execution is paused is indicated by the yellow arrow. The line with the `doWork` function call hasn't yet executed.
80
80
81
81
> [!TIP]
82
82
> If you have a breakpoint in a loop or recursion, or if you have many breakpoints that you frequently step through, use a [conditional breakpoint](../debugger/using-breakpoints.md#BKMK_Specify_a_breakpoint_condition_using_a_code_expression) to make sure that your code is suspended ONLY when specific conditions are met. A conditional breakpoint saves time and can also make it easier to debug issues that are hard to reproduce.
> Starting with Visual Studio 2022 version 17.9, visualizers can now be written in .NET 6.0+ that run out-of-process using the new VisualStudio.Extensibility model. We encourage visualizer authors to reference the new documentation at [Create Visual Studio debugger visualizers](../extensibility/visualstudio.extensibility/debugger-visualizer/debugger-visualizers.md) unless they want to support older versions of Visual Studio or want to ship their custom visualizers as part of a library DLL.
23
23
24
-
This walkthrough shows how to write a simple visualizer by using Visual Basic. The visualizer you will create in this walkthrough displays the contents of a string using a Windows Forms message box. This simple string visualizer is a basic example to show how you can create visualizers for other data types more applicable to your projects.
24
+
This walkthrough shows how to write a simple visualizer by using Visual Basic. The visualizer you'll create in this walkthrough displays the contents of a string using a Windows Forms message box. This simple string visualizer is a basic example to show how you can create visualizers for other data types more applicable to your projects.
25
25
26
26
> [!NOTE]
27
27
> The dialog boxes and menu commands you see might differ from those described in Help, depending on your active settings or edition. To change your settings, go to the **Tools** menu and choose **Import and Export** . For more information, see [Reset settings](../ide/personalizing-the-visual-studio-ide.md#reset-all-settings).
@@ -70,7 +70,7 @@ Visualizer code must be placed in a DLL that will be read by the debugger. The f
70
70
```
71
71
72
72
## Add the Debugger-side Code
73
-
Now, you are ready to create the debugger-side code. This is the code that runs within the debugger to display the information that you want to visualize. First, you have to change the declaration of the `DebuggerSide` object so that it inherits from the base class `DialogDebuggerVisualizer`.
73
+
Now, you're ready to create the debugger-side code. This is the code that runs within the debugger to display the information that you want to visualize. First, you have to change the declaration of the `DebuggerSide` object so that it inherits from the base class `DialogDebuggerVisualizer`.
74
74
75
75
### To inherit from DialogDebuggerVisualizer
76
76
@@ -102,7 +102,7 @@ Visualizer code must be placed in a DLL that will be read by the debugger. The f
102
102
EndSub
103
103
```
104
104
105
-
The `Show` method contains the code that actually creates the visualizer dialog box, or other user interface, and displays the information that has been passed to the visualizer from the debugger. You must add the code that creates the dialog box and displays the information. In this walkthrough, you will do this using a Windows Forms message box. First, you must add a reference and `Imports` statement for <xref:System.Windows.Forms>.
105
+
The `Show` method contains the code that actually creates the visualizer dialog box, or other user interface, and displays the information that has been passed to the visualizer from the debugger. You must add the code that creates the dialog box and displays the information. In this walkthrough, you'll do this using a Windows Forms message box. First, you must add a reference and `Imports` statement for <xref:System.Windows.Forms>.
106
106
107
107
### To add System.Windows.Forms
108
108
@@ -121,7 +121,7 @@ Visualizer code must be placed in a DLL that will be read by the debugger. The f
Nowyou'll add some code to create and show the user interface for your visualizer. Because this is your first visualizer, you'll keep the user interface simple and use a Message Box.
125
125
126
126
###Toshowthevisualizeroutputinadialogbox
127
127
@@ -131,12 +131,12 @@ Visualizer code must be placed in a DLL that will be read by the debugger. The f
Thatistheendofthedebugger-sidecode.There's one more step, however: the attribute that tells the debuggee side which collection of classes comprises the visualizer.
140
140
141
141
###Toaddthetypetovisualizeforthedebuggee-sidecode
142
142
@@ -151,7 +151,7 @@ In the debugger-side code, you specify the type to visualize (the object source)
Atthispoint,yourfirstvisualizerisfinished.Ifyouhavefollowedthestepscorrectly,youcanbuildthevisualizerandinstallitintoVisualStudio.BeforeyouinstallavisualizerintoVisualStudio,however,youshouldtestittomakesurethatitrunscorrectly.you'll now create a test harness to run the visualizer without installing it into Visual Studio.
155
155
156
156
###Toaddatestmethodtoshowthevisualizer
157
157
@@ -193,7 +193,7 @@ In the debugger-side code, you specify the type to visualize (the object source)
193
193
6. Click **OK**.
194
194
195
195
## Finish Your Test Harness and Test Your Visualizer
196
-
Now, you will add the code to finish the test harness.
196
+
Now, you'll add the code to finish the test harness.
197
197
198
198
### To add code to MyTestConsole
199
199
@@ -216,7 +216,7 @@ In the debugger-side code, you specify the type to visualize (the object source)
0 commit comments