Skip to content

Commit 65a1e9d

Browse files
TylerMSFTTylerMSFT
authored andcommitted
tech review
1 parent 6328362 commit 65a1e9d

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

docs/build/cmake-remote-debugging.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@
22
title: "Tutorial: Run and debug a CMake project on a remote machine"
33
ms.date: "11/20/2020"
44
ms.topic: tutorial
5-
description: "How to set up, run, and debug a CMake project on a remote machine"
5+
description: "How to use Visual Studio C++ on Windows to create and build a CMake project than you can deploy and debug on an ARM64 device."
66
---
77

88
# Tutorial: Run and debug a CMake project on a remote machine
99

10-
This tutorial shows how to use Visual Studio C++ on Windows to create and build a CMake project than you can deploy and debug on an ARM device. The steps can be generalized to deploy and debug a CMake project on a remote Windows device.
10+
This tutorial shows how to use Visual Studio C++ on Windows to create and build a CMake project than you can deploy and debug on an ARM64 device. The steps can be generalized to deploy and debug a CMake project that doesn't target ARM64.
11+
12+
This tutorial focuses on ARM64 because the default debugging experience for ARM64 is remote debugging. Attempting to debug ARM64 without configuring your CMake project as shown in this tutorial will result in an error that VS can't find the remote machine.
1113

1214
In this tutorial, you'll learn how to:
1315

1416
> [!div class="checklist"]
1517
>
1618
> * create a CMake project
17-
> * configure a CMake project to build for ARM
18-
> * configure a CMake project to run on a remote ARM device
19-
> * debug a CMake project running on a remote ARM device
19+
> * configure a CMake project to build for ARM64
20+
> * configure a CMake project to run on a remote ARM64 device
21+
> * debug a CMake project running on a remote ARM64 device
2022
2123
## Prerequisites
2224

2325
### On the host machine
2426

25-
Set up Visual Studio for cross-platform C++ development by installing the ARM build tools:
27+
Set up Visual Studio for cross-platform C++ development by installing the ARM64 build tools:
2628

2729
Todo! VS installer > Modify > Individual Components
2830
In the **Compilers, build tools, and runtimes** section install
@@ -32,7 +34,7 @@ Todo! VS installer > Modify > Individual Components
3234

3335
Install the remote debugging tools on the remote machine.
3436

35-
ToDo! This tutorial targets ARM, so install the ARM version of the Visual Studio 2019 remote debugging tools.
37+
ToDo! This tutorial targets ARM64, so install the ARM64 version of the Visual Studio 2019 remote debugging tools.
3638
[link to download](https://visualstudio.microsoft.com/downloads/#remote-tools-for-visual-studio-2019)
3739

3840
## Create a CMake project
@@ -42,20 +44,20 @@ Give the project a name and choose a location. Then select **Create**.
4244

4345
Give Visual Studio a few moments to create the project and populate the **Solution Explorer**.
4446

45-
## Change the configuration to target ARM
47+
## Change the configuration to target ARM64
4648

47-
Because you are targeting an ARM device, you need to use the ARM build tools. To select the ARM build tools, select the Visual Studio **Configuration** dropdown and select **Manage Configurations...**
49+
Because you are targeting an ARM64 device, you need to use the ARM64 build tools. To select the ARM64 build tools, select the Visual Studio **Configuration** dropdown and select **Manage Configurations...**
4850

4951
![Choose Manage Configurations in the Visual Studio configurations drop-down](media/vs2019-cmake-manage-configurations.png)
5052

51-
Change the **Configuration name** to **x64arm-debug**. This name is to make it apparent that we've modified the configuration to target ARM.
53+
Change the **Configuration name** to **arm64-debug**. This is a unique, friendly name to make it easier for you to identify these settings.
5254

5355
Select the **Toolset** dropdown and from the list of build tools, choose **msvc_arm64_x64**. Your settings should look something like this:
5456

5557
![CMake settings dialog](media/cmake-settings-editor2.png)
5658

5759
> [!Note]
58-
> In the **Toolset** dropdown, **msvc_arm** builds for 32-bit ARM, **msvc_arm64** builds for 64-bit ARM, and **msvc_arm64 x64** builds for 64-bit ARM from an x64 host--which is what you are doing in this tutorial.
60+
> In the **Toolset** dropdown, **msvc_arm64** builds for 64-bit ARM, and **msvc_arm64 x64** uses the 64-bit host tools to cross-compile for ARM64--which is what you will do in this tutorial.
5961
6062
## Add a debug configuration file
6163

@@ -74,11 +76,11 @@ In the **Solution Explorer**, right-click the executable and select **Add Debug
7476
This creates a `launch.vs.json` file in your project. Open it and change the following entries to enable remote debugging:
7577

7678
- `projectTarget` : set to the name of your executable; for example, `CMakeProject3`
77-
- `remoteMachineName` : set to the IP address of the remote ARM machine, or its machine name.
79+
- `remoteMachineName` : set to the IP address of the remote ARM64 machine, or its machine name.
7880

79-
## Start the remote debugger monitor on the ARM device
81+
## Start the remote debugger monitor on the ARM64 device
8082

81-
Before you run your CMake project, ensure that the Visual Studio 2019 remote debugger is running on the remote ARM machine. You may need to change the remote debugger options depending on your authentication situation.
83+
Before you run your CMake project, ensure that the Visual Studio 2019 remote debugger is running on the remote ARM64 machine. You may need to change the remote debugger options depending on your authentication situation.
8284

8385
From the VS Remote Debugger menu bar, select **Tools** > **Options**. Then set authentication to match how your environment is set up:
8486

@@ -129,19 +131,23 @@ On the Visual Studio toolbar, use the startup item dropdown to change the startu
129131
To start debugging, on the VS toolbar choose **Debug** > **Start Debugging** (or press **F5**).
130132

131133
If it doesn't start, ensure that the following are set correctly in the `launch.vs.json` file:
132-
- `"remoteMachineName"` should be set to the IP address, or machine name, of the remote ARM device.
134+
- `"remoteMachineName"` should be set to the IP address, or machine name, of the remote ARM64 device.
133135
- `"name"` should match the selection in the VS startup item dropdown.
134136
- `"projectTarget"` should be set to the name of the executable file.
135137
- `"type"` should be set to `"remoteWindows"`
136138
- If the authentication type on the remote debugger is set to **No Authentication**, you should have `"windowsAuthenticationType": "Remote Windows with No authentication"` set in the `launch.vs.json` file.
137139

138-
After the project builds, the app should appear on the remote ARM machine:
140+
After the project builds, the app should appear on the remote ARM64 machine:
139141

140142
![Startup item dropdown](media/remote-cmake-app.png)
141143

142144
## What you learned
143145

144-
In this tutorial, you created a CMake project, configured it to build for ARM and to run on a remote machine. Then you built, ran, and debugged it on a remote ARM device.
146+
In this tutorial, you created a CMake project, configured it to build for ARM64 and to run on a remote machine. Then you built, ran, and debugged it on a remote ARM64 device.
147+
148+
## Target other platforms.
149+
150+
145151

146152
## Next steps
147153

0 commit comments

Comments
 (0)