Skip to content

Commit 32ee5eb

Browse files
TylerMSFTTylerMSFT
authored andcommitted
cleanup pass
1 parent 65b4a9c commit 32ee5eb

7 files changed

+28
-28
lines changed

docs/get-started/tutorial-console-cpp.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ It's time to add some math logic.
141141

142142
![Screenshot of the Visual Studio 2019 Solution Explorer window displaying the Calculator Tutorial project.](./media/calc-vs2019-solution-explorer.png "Solution Explorer")
143143

144-
You should now have three tabs open in the editor: *`CalculatorTutorial.cpp`*, *Calculator.h*, and *`Calculator.cpp`*. If you accidentally close one of them, you can reopen it by double-clicking it in the **Solution Explorer** window.
144+
You should now have three tabs open in the editor: *`CalculatorTutorial.cpp`*, *`Calculator.h`*, and *`Calculator.cpp`*. If you accidentally close one of them, you can reopen it by double-clicking it in the **Solution Explorer** window.
145145

146-
1. In **Calculator.h**, remove the `Calculator();` and `~Calculator();` lines that were generated, since you won't need them here. Next, add the following line of code so the file now looks like this:
146+
1. In **`Calculator.h`**, remove the `Calculator();` and `~Calculator();` lines that were generated, since you won't need them here. Next, add the following line of code so the file now looks like this:
147147

148148
```cpp
149149
#pragma once
@@ -167,7 +167,7 @@ It's time to add some math logic.
167167

168168
A pop-up appears that gives you a peek of the code change that was made in the other file. The code was added to *`Calculator.cpp`*.
169169

170-
![Pop-up with definition of Calculate.](./media/calc-vs2019-pop-up-definition.png "Screenshot of a pop-up displaying the definition of Calculate.")
170+
!["Screenshot of a pop-up displaying the definition of Calculate."](./media/calc-vs2019-pop-up-definition.png)
171171

172172
Currently, it just returns 0.0. Let's change that. Press **Esc** to close the pop-up.
173173

@@ -267,7 +267,7 @@ Since the user is free to type anything into the console window, let's make sure
267267

268268
1. Set a breakpoint on the `result = c.Calculate(x, oper, y);` line, just after the user was asked for input. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window. A red dot appears.
269269

270-
![Screenshot of Visual Studio with a red dot on a line of code, representing a breakpoint.](./media/calc-vs2019-set-breakpoint.png "Set a breakpoint")
270+
![Screenshot of Visual Studio with a red dot to the left of a line of code, representing a breakpoint.](./media/calc-vs2019-set-breakpoint.png "Set a breakpoint")
271271

272272
Now when we debug the program, it always pauses execution at that line. We already have a rough idea that the program works for simple cases. Since we don't want to pause execution every time, let's make the breakpoint conditional.
273273

@@ -289,7 +289,7 @@ Whenever you debug your code, you may notice that some new windows appear. These
289289

290290
You can also just hover over variables in the code itself to see their current values where the execution is currently paused. Make sure the editor window is in focus by clicking on it first.
291291

292-
![Screenshot of Visual Studio showing a tooltip displaying the value of the variable oper, which is the character /.](./media/calc-vs2019-hover-tooltip.png "Hover to view current variable values")
292+
![Screenshot of a tooltip displaying the value of the variable oper, which is the character `/`.](./media/calc-vs2019-hover-tooltip.png "Hover to view current variable values")
293293

294294
### To continue debugging
295295

@@ -438,7 +438,7 @@ The template for a new windows console application creates a simple C++ "Hello W
438438

439439
1. To run the code, on the menu bar, choose **Debug**, **Start without debugging**.
440440

441-
![Screenshot of the Visual StudioDebug Console showing the output: Hello World!.](./media/calculator-hello-world-console.png "Start the project")
441+
![Screenshot of the Visual Studio Debug Console showing the output: Hello World!.](./media/calculator-hello-world-console.png "Start the project")
442442

443443
A console window opens and then runs your app. When you start a console app in Visual Studio, it runs your code, then prints "Press any key to continue . . ." to give you a chance to see the output. Congratulations! You've created your first "Hello, world!" console app in Visual Studio!
444444

@@ -494,7 +494,7 @@ Now let's turn the code in this template into a calculator app.
494494
1. To run the application, press **Ctrl+F5** or go to the **Debug** menu and choose **Start Without Debugging**. If you get a pop-up that says **This project is out of date**, you may select **Do not show this dialog again**, and then choose **Yes** to build your application. You should see a console window appear that displays the text specified in the code.
495495

496496
:::image type="complex" source="./media/calculator-first-launch.gif" alt-text="Short video of running the calculator app.":::
497-
Short video showing Debug > Start without debugging. A dialog asks whether to build because the project is out of date. The checkbox for Do not show this dialog again is selected. Yes is selected to build the project, the calculator project builds, and then launches in a Windows console window.
497+
Short video showing Debug > Start without debugging. A dialog is visible that asks whether to build because the project is out of date. The checkbox for 'Do not show this dialog again' is selected. 'Yes' is selected to build the project, the calculator project builds, and then launches in a Windows console window.
498498
:::image-end:::
499499

500500
1. Close the console window when you're done.
@@ -513,9 +513,9 @@ It's time to add some math logic.
513513

514514
![Screenshot of the Solution Explorer window displaying the Calculator Tutorial project.](./media/calculator-solution-explorer.png "Solution Explorer")
515515

516-
You should now have three tabs open in the editor: *`CalculatorTutorial.cpp`*, *Calculator.h*, and *`Calculator.cpp`*. If you accidentally close one of them, you can reopen it by double-clicking it in the **Solution Explorer** window.
516+
You should now have three tabs open in the editor: *`CalculatorTutorial.cpp`*, *`Calculator.h`*, and *`Calculator.cpp`*. If you accidentally close one of them, you can reopen it by double-clicking it in the **Solution Explorer** window.
517517

518-
1. In **Calculator.h**, remove the `Calculator();` and `~Calculator();` lines that were generated, since you won't need them here. Next, add the following line of code so the file now looks like this:
518+
1. In **`Calculator.h`**, remove the `Calculator();` and `~Calculator();` lines that were generated, since you won't need them here. Next, add the following line of code so the file now looks like this:
519519

520520
```cpp
521521
#pragma once
@@ -637,21 +637,21 @@ Since the user is free to type anything into the console window, let's make sure
637637

638638
1. Set a breakpoint on the `result = c.Calculate(x, oper, y);` line, just after the user was asked for input. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window. A red dot appears.
639639

640-
![Short video of Visual Studio showing the user creating the red dot in the left of a line of code that represents a breakpoint.](./media/calculator-set-breakpoint.gif "Set a breakpoint")
640+
![Short video of Visual Studio showing the user setting a breakpoint which creates a red dot to the left of the line of code.](./media/calculator-set-breakpoint.gif "Set a breakpoint")
641641

642642
Now when we debug the program, it always pauses execution at that line. We already have a rough idea that the program works for simple cases. Since we don't want to pause execution every time, let's make the breakpoint conditional.
643643

644644
1. Right-click the red dot that represents the breakpoint, and choose **Conditions**. In the edit box for the condition, enter `(y == 0) && (oper == '/')`. Choose the **Close** button when you're done. The condition is saved automatically.
645645

646646
:::image type="complex" source="./media/calculator-conditional-breakpoint.gif" alt-text="Set a conditional breakpoint":::
647-
Short video showing a right-click on the breakpoint on the line of code that reads result = c dot Calculate ( x, oper, y). Conditions... is selected in the dropdown which opens the breakpoint settings window. In the text box following the Conditional Expression and Is true dropdowns, the user enters y==0 && oper == '/', and then selects close to set the conditional breakpoint.
647+
Short video showing a right-click on the breakpoint. The breakpoint is on the line of code that reads result = c dot Calculate ( x, oper, y). 'Conditions...' is selected in the dropdown which opens the breakpoint settings window. In the text box following the Conditional Expression and Is true dropdowns, the user enters y == 0 && oper == '/', and then selects close to set the conditional breakpoint.
648648
:::image-end:::
649649

650650
Now we pause execution at the breakpoint specifically if a division by 0 is attempted.
651651

652652
1. To debug the program, press **F5**, or choose the **Local Windows Debugger** toolbar button that has the green arrow icon. In your console app, if you enter something like "5 - 0", the program behaves normally and keeps running. However, if you type "10 / 0", it pauses at the breakpoint. You can even put any number of spaces between the operator and numbers; `cin` is smart enough to parse the input appropriately.
653653

654-
![Short video showing that the program paused at the conditional breakpoint.](./media/calculator-debug-conditional.gif "Pause at the conditional breakpoint")
654+
![Short video showing the program paused at the conditional breakpoint.](./media/calculator-debug-conditional.gif "Pause at the conditional breakpoint")
655655

656656
### Useful windows in the debugger
657657

@@ -661,11 +661,11 @@ Whenever you debug your code, you may notice that some new windows appear. These
661661

662662
To see all of the variables from that function, switch to the **Locals** window. You can actually modify the values of these variables while debugging, to see what effect they would have on the program. In this case, we'll leave them alone.
663663

664-
![Screenshot of the Locals window showing the values of the local variables.](./media/calculator-locals.png "The Locals window")
664+
![Screenshot of the Locals window showing the values of the function's local variables.](./media/calculator-locals.png "The Locals window")
665665

666666
You can also just hover over variables in the code itself to see their current values where the execution is currently paused. Make sure the editor window is in focus by clicking on it first.
667667

668-
![Short video showing the tooltip that appears when you hover over a variable and displays the variables' value.](./media/calculator-hover-tooltip.gif "Hover to view current variable values")
668+
![Short video showing the tooltip that appears when you hover over a variable. The tooltip displays the variable's value.](./media/calculator-hover-tooltip.gif "Hover to view current variable values")
669669

670670
### To continue debugging
671671

docs/linux/cmake-linux-configure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ To target WSL, select **Manage Configurations** in the configuration dropdown in
129129

130130
The **CMakeSettings.json** window appears.
131131

132-
![CMake settings dialog with the plus button highlighted which adds the selected configuration: Linux-GCC-debug.](media/cmake-linux-configurations.png )
132+
![CMake settings dialog with the plus button highlighted which adds the selected configuration, which is Linux-GCC-debug.](media/cmake-linux-configurations.png )
133133

134134
Press **Add Configuration** (the green '+' button) and then choose **Linux-GCC-Debug** or **Linux-GCC-Release** if using GCC. Use the Clang variants if you're using the Clang/LLVM toolset. Press **Select** and then **Ctrl+S** to save the configuration.
135135

docs/linux/connect-to-your-remote-linux-computer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste
6464

6565
1. In the Connection Manager dialog, choose the **Add** button to add a new connection.
6666

67-
![Screenshot showing CrossPlatform > C plus plus > Connection Manager selected under options, and the Add button highlighted.](media/settings_connectionmanager.png)
67+
![Screenshot showing the options pane and CrossPlatform > C plus plus > Connection Manager selected. The Add button is highlighted.](media/settings_connectionmanager.png)
6868

6969
In either scenario, the **Connect to Remote System** window is displayed.
7070

@@ -203,7 +203,7 @@ The `rsync` command is used by both MSBuild-based Linux projects and CMake proje
203203

204204
`rsync` is also used by Visual Studio's CMake support to copy source files to the remote system. If you can't enable TCP port forwarding, you can use `sftp` as your remote copy sources method. `sftp` is often slower than `rsync`, but doesn't have a dependency on TCP port forwarding. You can manage your remote copy sources method with the `remoteCopySourcesMethod` property in the [CMake Settings Editor](../build/cmakesettings-reference.md#settings-for-cmake-linux). If TCP port forwarding is disabled on your remote system, you'll see an error in the CMake output window the first time it invokes `rsync`.
205205

206-
![Screenshot of the output window showing an Rsync Error that the SSH channel couldn't be opened.](media/port-forwarding-copy-error.png)
206+
![Screenshot of the output window which shows an Rsync Error that the SSH channel couldn't be opened.](media/port-forwarding-copy-error.png)
207207

208208
`gdbserver` can be used for debugging on embedded devices. If you can't enable TCP port forwarding, then you must use `gdb` for all remote debugging scenarios. `gdb` is used by default when debugging projects on a remote system.
209209

docs/linux/deploy-run-and-debug-your-linux-project.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The [Debugging](prop-pages/debugging-linux.md) property page for Visual Studio p
104104
<?xml version="1.0" encoding="utf-8"?>
105105
<SupplementalLaunchOptions>
106106
<AttachOptions>
107-
<AttachOptionsForConnection lSOLibSearchPath="/home/user/solibs">
107+
<AttachOptionsForConnection AdditionalSOLibSearchPath="/home/user/solibs">
108108
<ServerOptions MIDebuggerPath="C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\VC\Linux\bin\gdb\7.9\x86_64-linux-gnu-gdb.exe"
109109
ExePath="C:\temp\ConsoleApplication17\ConsoleApplication17\bin\x64\Debug\ConsoleApplication17.out"/>
110110
<SetupCommands>
@@ -125,13 +125,13 @@ You can separate your remote build machine from your remote debug machine for bo
125125

126126
By default, the remote debug machine is the same as the remote build machine (**Configuration Properties** > **General** > **Remote Build Machine**). To specify a new remote debug machine, right-click on the project in **Solution Explorer** and go to **Configuration Properties** > **Debugging** > **Remote Debug Machine**.
127127

128-
![Screenshot showing the Linux remote debug machine property in the Property Pages dialog which displays the username, authentication type, and port.](media/linux-remote-debug-machine.png)
128+
![Screenshot showing the Linux remote debug machine property in the Property Pages dialog which shows the username, authentication type, and port.](media/linux-remote-debug-machine.png)
129129

130130
The drop-down menu for **Remote Debug Machine** is populated with all established remote connections. To add a new remote connection, navigate to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or search for "Connection Manager" in **Quick Launch**. You can also specify a new remote deploy directory in the project's Property Pages (**Configuration Properties** > **General** > **Remote Deploy Directory**).
131131

132132
By default, only the files necessary for the process to debug will be deployed to the remote debug machine. You can use **Solution Explorer** to configure which source files will be deployed to the remote debug machine. When you click on a source file, you'll see a preview of its File Properties directly below the Solution Explorer.
133133

134-
![Screenshot showing the properties of main.cpp with content = False highlighted.](media/linux-deployable-content.png)
134+
![Screenshot showing the properties of the file main.cpp with the property content = False highlighted.](media/linux-deployable-content.png)
135135

136136
The **Content** property specifies whether the file will be deployed to the remote debug machine. You can disable deployment entirely by navigating to **Property Pages** > **Configuration Manager** and unchecking **Deploy** for the desired configuration.
137137

@@ -158,7 +158,7 @@ In some cases, you may require more control over your project's deployment. For
158158

159159
For CMake projects that target a remote Linux machine, you can specify a new remote debug machine in launch.vs.json. By default, the value of "remoteMachineName" is synchronized with the "remoteMachineName" property in CMakeSettings.json, which corresponds to your remote build machine. These properties no longer need to match, and the value of "remoteMachineName" in launch.vs.json will dictate which remote machine is used for deploy and debug.
160160

161-
![The CMake remote debug machine specified in the launch_schema.json file. remote Machine Name is specified as ${debugInfo . remoteMachineName}](media/cmake-remote-debug-machine.png)
161+
![The CMake remote debug machine specified in the launch_schema.json file. The remote Machine Name is ${debugInfo . remoteMachineName}](media/cmake-remote-debug-machine.png)
162162

163163
IntelliSense will suggest all a list of all established remote connections. You can add a new remote connection by navigating to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or searching for "Connection Manager" in **Quick Launch**.
164164

docs/linux/download-install-and-setup-the-linux-development-workload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For any of these scenarios, the **Linux development with C++** workload is requi
2828

2929
1. Type "Visual Studio Installer" in the Windows search box:
3030

31-
![Screenshot showing the Windows search box with the contents visual studio installer.](media/visual-studio-installer-search.png)
31+
![Screenshot of the Windows search box which contains the text: `visual studio installer`.](media/visual-studio-installer-search.png)
3232

3333
1. Look for the installer under the **Apps** results and double-click it. When the installer opens, choose **Modify**, and then click on the **Workloads** tab. Scroll down to **Other toolsets** and select the **Linux development with C++** workload.
3434

docs/linux/linux-asan-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ You can also view the full ASan output (including where the corrupted memory was
3131
3232
To enable ASan for MSBuild-based Linux projects, right-click on the project in **Solution Explorer** and select **Properties**. Next, navigate to **Configuration Properties** > **C/C++** > **Sanitizers**. ASan is enabled via compiler and linker flags, and requires your project to be recompiled to work.
3333

34-
![Screenshot of the project property page with Configuration Properties > C/C plus plus > Sanitizers Enable Address Sanitizer drop down set to Yes.](media/msbuild-asan-prop-page.png)
34+
![Screenshot of the project property page with Configuration Properties > C/C plus plus > Sanitizers selected. Enable Address Sanitizer is set to Yes.](media/msbuild-asan-prop-page.png)
3535

3636
You can pass optional ASan runtime flags by navigating to **Configuration Properties** > **Debugging** > **AddressSanitizer Runtime Flags**. Click the down-arrow to add or remove flags.
3737

38-
![Screenshot of the project property page with Configuration Properties > Debugging > Address Sanitizer Runtime Flags set to detect_leaks = 0.](media/msbuild-asan-runtime-flags.png)
38+
![Screenshot of the project property page with Configuration Properties > Debugging selected. Address Sanitizer Runtime Flags is `detect_leaks = 0`.](media/msbuild-asan-runtime-flags.png)
3939

4040
## Enable ASan for Visual Studio CMake projects
4141

@@ -46,7 +46,7 @@ To enable ASan for CMake, right-click on the `CMakeLists.txt` file in **Solution
4646

4747
Make sure you have a Linux configuration (for example, **Linux-Debug**) selected in the left pane of the dialog:
4848

49-
![Screenshot of the Configurations pane with Linux Debug listed as one of the options.](media/linux-debug-configuration.png)
49+
![Screenshot of the Configurations pane with x64-Debug and Linux Debug listed as the options.](media/linux-debug-configuration.png)
5050

5151
The ASan options are under **General**. Enter the ASan runtime flags in the format "flag=value", separated by spaces. The UI incorrectly suggests using semi-colons. Use spaces or colons to separate flags.
5252

0 commit comments

Comments
 (0)