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/build/configure-cmake-debugging-sessions.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,19 @@
1
1
---
2
2
title: "Configure CMake debugging sessions in Visual Studio"
3
3
description: "Describes how to use Visual Studio to configure CMake debugger settings"
4
-
ms.date: "01/10/2020"
4
+
ms.date: "01/13/2020"
5
5
helpviewer_keywords: ["CMake debugging"]
6
6
---
7
7
# Configure CMake debugging sessions
8
8
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
+
9
17
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.
@@ -119,7 +127,17 @@ The following properties are specific to **remote debug configurations**. You ca
119
127
120
128
- `miDebuggerPath`: The full path to gdb. When unspecified, Visual Studio searches PATH first for the debugger.
121
129
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).
123
141
124
142
- `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).
125
143
@@ -141,14 +159,26 @@ The following properties can be used to separate your **remote build system** fr
141
159
142
160
- `executable`: Indicates whether the deployed file is an executable.
143
161
162
+
::: moniker-end
163
+
164
+
::: moniker range=">=vs-2017"
165
+
144
166
## Attach to a remote process
145
167
146
168
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).
147
169
170
+
::: moniker-end
171
+
172
+
::: moniker range="vs-2019"
173
+
148
174
## Debug on Linux using gdbserver
149
175
150
176
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/).
151
177
178
+
::: moniker-end
179
+
180
+
::: moniker range=">=vs-2017"
181
+
152
182
## See also
153
183
154
184
[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
0 commit comments