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
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
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: 12/16/2020
4
+
ms.date: 10/26/2023
5
5
helpviewer_keywords: ["CMake debugging"]
6
6
---
7
7
# Configure CMake debugging sessions
@@ -16,26 +16,26 @@ Native CMake support is available in Visual Studio 2017 and later. To see the do
16
16
17
17
All executable CMake targets are shown in the **Startup Item** dropdown in the toolbar. Select one to start a debugging session and launch the debugger.
18
18
19
-
:::image type="complex" source="media/new-dropdowns.png" alt-text="Screenshot of the CMake startup items.":::
20
-
There is a play button dropdown to select the current debug target. It shows your debug targets. In this example, the HelloWorld.exe debug target is available.
19
+
:::image type="complex" source="media/new-dropdowns.png" alt-text="Screenshot of the CMake startup items dropdown.":::
20
+
The dropdown provides a list of debug targets to choose from. The selected item appears as a play button followed by the name of the selected debug target to run. In this example, the selected debug target is Hello World .exe.
21
21
:::image-end:::
22
22
23
23
You can also start a debug session from Solution Explorer. First, switch to **CMake Targets View** in the **Solution Explorer** window.
24
24
25
-
:::image type="complex" source="media/switch-to-targets-view.png" alt-text="Screenshot of the CMake Targets View menu":::
26
-
The solution explorer is shown. A right-click on an item in the Folder View has opened a menu. On that menu, the Switch to Targets View item is highlighted.
25
+
:::image type="complex" source="media/switch-to-targets-view.png" alt-text="Screenshot of the CMake Targets View menu.":::
26
+
The solution explorer is shown. A right-click on an item in the Folder View has opened a menuthat shows options such as Open, Open with, Compare with, and so on. The Switch to Targets View menu item is highlighted.
27
27
:::image-end:::
28
28
29
29
Then, right-click on an executable and select **Debug**. This command automatically starts debugging the selected target based on your active configuration.
30
30
31
31
:::image type="complex" source="media/debug-targets-view.png" alt-text="Screenshot of the CMake Targets View debug option menu.":::
32
-
When you right-click on a target in the CMake Targets view, there is an option to debug a chosen target. The Debug option is highlighted.
32
+
A right-click on a target in the CMake Targets view has opened a menu with options such as Set as Startup item, Build, Clean All, and so on. The Debug menu option is highlighted.
33
33
:::image-end:::
34
34
35
35
Starting in Visual Studio 2022 Version 17.6, you can also start a debugging session on your CMakeLists.txt file. To do so, just set a breakpoint in your CMakeLists.txt file and run **Configure Project with CMake Debugger** from the **Project** dropdown.
36
36
37
37
:::image type="complex" source="media/cmake-debugger-entry.png" alt-text="Screenshot of the CMake Debugger dropdown.":::
38
-
The Project dropdown is shown. The option to Configure Project with CMake debugger is highlighted.
38
+
The Project dropdown is shown. The menu option to Configure Project with CMake debugger is highlighted.
0 commit comments