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/linux/cmake-linux-configure.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
@@ -12,17 +12,17 @@ Linux support is available in Visual Studio 2017 and later. To see the documenta
12
12
::: moniker range=">=vs-2017"
13
13
This topic describes how to configure a C++ Linux project, continuing the series that began with [Create a Linux CMake project in Visual Studio](cmake-linux-project.md). If you are using MSBuild, instead, see [Configure a Linux Project in Visual Studio](configure-a-linux-project.md)
14
14
15
-
## Configure a CMAKE build
15
+
## Configure a CMake build for Linux
16
16
17
-
To configure the build, open the CMake Settings Editor. This creates a **CMakeSettings.json** file at the root of your project. Configurations can be used to target different platforms (Windows, WSL, a remote system) with the same source code. They are also used to set your compilers, pass environment variables, and customize how CMake is invoked.
17
+
To configure the build, open the CMake Settings Editor. This creates a *CMakeSettings.json* file at the root of your project. Configurations can be used to target different platforms (Windows, WSL, a remote system) with the same source code. They are also used to set your compilers, pass environment variables, and customize how CMake is invoked.
18
18
19
19
The *CMakeSettings.json* file in a CMake Linux project specifies some or all of the properties listed in [Customize CMake settings](../build/customize-cmake-settings.md), plus additional properties that control the build settings on the remote Linux machine.
20
20
::: moniker-end
21
21
22
22
::: moniker range="vs-2017"
23
23
To change the default CMake settings in Visual Studio 2017, choose **CMake** > **Change CMake Settings** > **CMakeLists.txt** from the main menu. Or, right-click *CMakeSettings.txt* in **Solution Explorer** and choose **Change CMake Settings**. Visual Studio then creates a new *CMakeSettings.json* file in your root project folder. You can open the file using the **CMake Settings** editor or modify the file directly. For more information, see [Customize CMake settings](../build/customize-cmake-settings.md).
24
24
25
-
Given the following code and CMakeLists.txt file:
25
+
Given the following code and *CMakeLists.txt* file:
26
26
27
27
```cpp
28
28
// hello.cpp
@@ -125,7 +125,7 @@ You can use the following optional settings for more control:
125
125
126
126
These options allow you to run commands on the Linux system before and after building, and before CMake generation. The values can be any command that is valid on the remote system. The output is piped back to Visual Studio.
127
127
128
-
## Next step
128
+
## Next steps
129
129
130
130
[Debug a CMake Linux project](cmake-linux-debug.md)
Copy file name to clipboardExpand all lines: docs/linux/cmake-linux-debug.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ When you open a CMake project folder, Visual Studio parses the *CMakeLists.txt*
24
24
::: moniker range="vs-2019"
25
25
### Windows Subsystem for Linux
26
26
27
-
If you're targeting Windows Subsystem for Linux (WSL), select **Manage Configurations** in the configuration dropdown in the main toolbar. Then press the **Add Configuration** button and choose **WSL-Debug** or **WSL-Release** if using GCC. Use the Clang variants if using the Clang/LLVM toolset.
27
+
To target Windows Subsystem for Linux (WSL), select **Manage Configurations** in the configuration dropdown in the main toolbar. Then press the **Add Configuration** button and choose **WSL-Debug** or **WSL-Release** if using GCC. Use the Clang variants if using the Clang/LLVM toolset.
28
28
29
29
**Visual Studio 2019 version 16.1** When targeting WSL, no copying of sources or headers is necessary. That's because the compiler on Linux has direct access to your source files in the Windows file system. (In Windows 10 version 1903 and later, Windows applications likewise can access the Linux header files directly. Visual Studio doesn't take advantage of this capability yet.)
30
30
::: moniker-end
@@ -46,7 +46,7 @@ After you select a target, CMake runs automatically on the Linux system to gener
46
46
47
47
### Intellisense
48
48
49
-
To provide IntelliSense support for headers on remote Linux systems, Visual Studio automatically copies them from the Linux machine to a directory on your local Windows machine. For more information, see [IntelliSense for remote headers](configure-a-linux-project.md#remote_intellisense).
49
+
Accurate C++ IntelliSense requires access to the C++ headers that are referenced by C++ source files. Visual Studio automatically copies the headers referenced by a CMake project from Linux to Windows to provide a full-fidelity IntelliSense experience. For more information, see [IntelliSense for remote headers](configure-a-linux-project.md#remote_intellisense).
Copy file name to clipboardExpand all lines: docs/linux/cmake-linux-project.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Also, make sure the following are installed on the remote machine:
28
28
- gdb
29
29
- rsync
30
30
- zip
31
-
- ninja-build if you're using Visual Studio 2019 or above
31
+
- ninja-build (Visual Studio 2019 or above)
32
32
::: moniker-end
33
33
34
34
::: moniker range="vs-2017"
@@ -59,8 +59,6 @@ Alternatively, you can open your own CMake project in Visual Studio 2019. The fo
59
59
::: moniker range=">=vs-2017"
60
60
## Open a CMake project folder
61
61
62
-
You can bring your own CMake project to Visual Studio by opening the folder that contains the `CMakeLists.txt` file.
63
-
64
62
When you open a folder that contains an existing CMake project, Visual Studio uses variables in the CMake cache to automatically configure IntelliSense and builds. Local configuration and debugging settings get stored in JSON files. You can optionally share these files with others who are using Visual Studio.
65
63
66
64
Visual Studio doesn't modify the *CMakeLists.txt* files. It's left alone so that others working on the same project can continue to use their existing tools. Visual Studio does regenerate the cache when you save edits to *CMakeLists.txt* or in some cases to *CMakeSettings.json*. But if you're using an **Existing Cache** configuration, then Visual Studio doesn't modify the cache.
Copy file name to clipboardExpand all lines: docs/linux/configure-a-linux-project.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
@@ -1,17 +1,17 @@
1
1
---
2
-
title: "Configure a C++ Linux project in Visual Studio"
3
-
ms.date: "06/22/2020"
2
+
title: "Configure a MSBuild-based C++ Linux project in Visual Studio"
3
+
ms.date: "08/04/2020"
4
4
ms.assetid: 4d7c6adf-54b9-4b23-bd23-5de0c825b768
5
5
---
6
-
# Configure a Linux project
6
+
# Configure a MSBuild-based C++ Linux project in Visual Studio
7
7
8
8
::: moniker range="vs-2015"
9
9
10
10
Linux support is available in Visual Studio 2017 and later.
11
11
12
12
::: moniker-end
13
13
14
-
This topic describes how to configure a C++ Linux project as described in [Create a new C++ Linux project in Visual Studio](create-a-new-linux-project.md). For CMake Linux projects, see [Configure a Linux CMake Project](cmake-linux-project.md).
14
+
This topic describes how to configure a C++ Linux project as described in [Create a MSBuild-based C++ Linux project in Visual Studio](create-a-new-linux-project.md). For CMake Linux projects, see [Configure a Linux CMake Project](cmake-linux-project.md).
15
15
16
16
You can configure a Linux project to target a physical Linux machine, a virtual machine, or the [Windows Subsystem for Linux](/windows/wsl/about) (WSL).
Copy file name to clipboardExpand all lines: docs/linux/deploy-run-and-debug-your-linux-project.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
-
title: "Deploy, run, and debug your C++ Linux project in Visual Studio"
3
-
description: "Describes how to compile, execute, and debug code on the remote target from inside a Linux C++ project in Visual Studio."
4
-
ms.date: "06/07/2019"
2
+
title: "Deploy, run, and debug your MSBuild-based C++ Linux project in Visual Studio"
3
+
description: "Describes how to compile, execute, and debug code on the remote target from inside a MSBuild-based Linux C++ project in Visual Studio."
4
+
ms.date: "08/04/2020"
5
5
ms.assetid: f7084cdb-17b1-4960-b522-f84981bea879
6
6
---
7
-
# Deploy, run, and debug your Linux project
7
+
# Deploy, run, and debug your MSBuild-based Linux project
8
8
9
9
::: moniker range="vs-2015"
10
10
11
11
Linux support is available in Visual Studio 2017 and later.
12
12
13
13
::: moniker-end
14
14
15
-
Once you have created a Linux C++ project in Visual Studio and you have connected to the project using the [Linux Connection Manager](connect-to-your-remote-linux-computer.md), you can run and debug the project. You compile, execute, and debug the code on the remote target.
15
+
Once you've created a MSBuild-based Linux C++ project in Visual Studio and you've connected to the project using the [Linux Connection Manager](connect-to-your-remote-linux-computer.md), you can run and debug the project. You compile, execute, and debug the code on the remote target.
16
16
17
17
::: moniker range="vs-2019"
18
18
@@ -46,20 +46,20 @@ There are several ways to interact with and debug your Linux project.
46
46
47
47
::: moniker-end
48
48
49
-
- In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. Note that this is the only mode that the Linux Console window supports.
49
+
- In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. This is the only mode that the Linux Console window supports.
50
50
51
-
- In **gdb** mode, the Visual Studio debugger drives GDB on the remote system. This is a better option if the local version of GDB is not compatible with the version installed on the target computer. |
51
+
- In **gdb** mode, the Visual Studio debugger drives GDB on the remote system. This is a better option if the local version of GDB isn't compatible with the version installed on the target computer. |
52
52
53
53
> [!NOTE]
54
54
> If you are unable to hit breakpoints in gdbserver debugging mode, try gdb mode. gdb must first be [installed](download-install-and-setup-the-linux-development-workload.md) on the remote target.
55
55
56
56
1. Select the remote target using the standard **Debug** toolbar in Visual Studio.
57
57
58
-
When the remote target is available, you will see it listed by either name or IP address.
58
+
When the remote target is available, you'll see it listed by either name or IP address.
59
59
60
60

61
61
62
-
If you have not yet connected to the remote target, you will see an instruction to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target.
62
+
If you haven't connected to the remote target yet, you'll see an instruction to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target.
63
63
64
64

65
65
@@ -81,7 +81,7 @@ There are several ways to interact with and debug your Linux project.
81
81
82
82

83
83
84
-
This console will display any console output from the target computer as well as take input and send it to the target computer.
84
+
This console will display any console output from the target computer and take input and send it to the target computer.
The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for additional .so libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/master/src/MICore/LaunchOptions.xsd) on GitHub.
121
+
The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for additional .so libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that, you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/master/src/MICore/LaunchOptions.xsd) on GitHub.
122
122
123
123
::: moniker range="vs-2019"
124
124
125
125
## <aname="separate_build_debug"></a> Specify different machines for building and debugging
126
126
127
-
In Visual Studio 2019 version 16.1 You can separate your remote build machine from your remote debug machine for both MSBuild-based Linux projects and CMake projects that target a remote Linux machine. For example, you can now cross-compile on x64 and deploy to an ARM device when targeting IoT scenarios.
127
+
In Visual Studio 2019 version 16.1, you can separate your remote build machine from your remote debug machine for both MSBuild-based Linux projects and CMake projects that target a remote Linux machine. For example, you can now cross-compile on x64 and deploy to an ARM device when targeting IoT scenarios.
128
128
129
129
### MSBuild-based projects
130
130
@@ -134,13 +134,13 @@ By default, the remote debug machine is the same as the remote build machine (**
134
134
135
135
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**).
136
136
137
-
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 will see a preview of its File Properties directly below the Solution Explorer.
137
+
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.
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.
142
142
143
-
In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file ordirectory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names:
143
+
In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file or directory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names:
0 commit comments