Skip to content

Commit 5f2c8ea

Browse files
author
Colin Robertson
authored
Add versioning monikers per Erika's outline
1 parent 7c66bad commit 5f2c8ea

1 file changed

Lines changed: 34 additions & 2 deletions

File tree

docs/build/configure-cmake-debugging-sessions.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
---
22
title: "Configure CMake debugging sessions in Visual Studio"
33
description: "Describes how to use Visual Studio to configure CMake debugger settings"
4-
ms.date: "01/10/2020"
4+
ms.date: "01/13/2020"
55
helpviewer_keywords: ["CMake debugging"]
66
---
77
# Configure CMake debugging sessions
88

9+
::: moniker range="vs-2015"
10+
11+
Native CMake support is available in Visual Studio 2017 and later.
12+
13+
::: moniker-end
14+
15+
::: moniker range=">=vs-2017"
16+
917
All executable CMake targets are shown in the **Startup Item** dropdown in the **General** toolbar. To start a debugging session, just select one and launch the debugger.
1018

1119
![CMake startup item dropdown](media/cmake-startup-item-dropdown.png "CMake startup item dropdown")
@@ -119,7 +127,17 @@ The following properties are specific to **remote debug configurations**. You ca
119127

120128
- `miDebuggerPath`: The full path to gdb. When unspecified, Visual Studio searches PATH first for the debugger.
121129

122-
The following properties can be used to separate your **remote build system** from your **remote debug system**. See [Specify different machines for building and debugging](../linux/deploy-run-and-debug-your-linux-project.md#cmake-projects) for more information.
130+
::: moniker-end
131+
132+
::: moniker range="vs-2017"
133+
134+
- `remoteMachineName`: The remote Linux system that hosts gdb and the program to debug.
135+
136+
::: moniker-end
137+
138+
::: moniker range="vs-2019"
139+
140+
The following properties can be used to separate your **remote build system** from your **remote debug system**. For more information, see [Specify different machines for building and debugging](../linux/deploy-run-and-debug-your-linux-project.md#cmake-projects).
123141

124142
- `remoteMachineName`: The remote Linux system that hosts gdb and the program to debug. This entry doesn't need to match the remote Linux system used for build specified in *CMakeSettings.json*. Press **Ctrl+Space** to view a list of all remote connections stored in the [Connection Manager](../linux/connect-to-your-remote-linux-computer.md).
125143

@@ -141,14 +159,26 @@ The following properties can be used to separate your **remote build system** fr
141159

142160
- `executable`: Indicates whether the deployed file is an executable.
143161

162+
::: moniker-end
163+
164+
::: moniker range=">=vs-2017"
165+
144166
## Attach to a remote process
145167

146168
You can attach to a process running on your Linux system by setting `processId` to the Process ID to attach the debugger to. For more information, see [Troubleshoot attaching to processes using GDB](https://github.com/Microsoft/MIEngine/wiki/Troubleshoot-attaching-to-processes-using-GDB).
147169

170+
::: moniker-end
171+
172+
::: moniker range="vs-2019"
173+
148174
## Debug on Linux using gdbserver
149175

150176
Visual Studio 2019 version 16.5 Preview 1 or later supports the remote debugging of CMake projects with gdbserver. For more information, see [debugging Linux CMake projects with gdbserver](https://devblogs.microsoft.com/cppblog/debugging-linux-cmake-projects-with-gdbserver/).
151177

178+
::: moniker-end
179+
180+
::: moniker range=">=vs-2017"
181+
152182
## See also
153183

154184
[CMake projects in Visual Studio](cmake-projects-in-visual-studio.md)\
@@ -158,3 +188,5 @@ Visual Studio 2019 version 16.5 Preview 1 or later supports the remote debugging
158188
[Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)\
159189
[Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)\
160190
[CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
191+
192+
::: moniker-end

0 commit comments

Comments
 (0)