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/python/debugging-symbols-for-mixed-mode-c-cpp-python.md
+44-7Lines changed: 44 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Symbols for mixed-mode Python/C++ debugging
3
3
description: Explore how you can use Visual Studio to load symbols from program database (PDB) files to support complete mixed-mode debugging for C++ and Python.
4
-
ms.date: 04/18/2024
4
+
ms.date: 11/21/2025
5
5
ms.topic: how-to
6
6
author: cwebster-99
7
7
ms.author: cowebster
@@ -21,10 +21,21 @@ To provide a full debugging experience, the [mixed-mode Python debugger](debuggi
21
21
22
22
- In Visual Studio 2015 and earlier, or for other interpreters, you need to download symbols separately and then point Visual Studio to the files.
23
23
24
-
When Visual Studio detects missing required symbols, a dialog prompts you to take action. You typically see the dialog when you start a mixed-mode debugging session. The dialog includes the **Open symbol settings dialog** link, which opens the **Tools** > **Options** dialog to the **Debugging** > **Symbols** tab, along with a link to this documentation article.
24
+
When Visual Studio detects missing required symbols, a dialog prompts you to take action. You typically see the dialog when you start a mixed-mode debugging session. The dialog includes two links, one of which opens this documentation article.
25
25
26
26
:::image type="content" source="media/mixed-mode-debugging-symbols-required.png" alt-text="Screenshot that shows the prompt in Visual Studio to provide the missing required debugging symbols." lightbox="media/mixed-mode-debugging-symbols-required.png" border="false":::
27
27
28
+
:::moniker range="visualstudio"
29
+
30
+
The **Open symbol settings dialog** opens the **Tools** > **Options** pane to the **All Settings** > **Debugging** > **Symbols** section.
31
+
32
+
:::moniker-end
33
+
:::moniker range="<=vs-2022"
34
+
35
+
The **Open symbol settings dialog** opens the **Tools** > **Options** dialog to the **Debugging** > **Symbols** section.
36
+
37
+
:::moniker-end
38
+
28
39
## Prerequisites
29
40
30
41
- Visual Studio installed with support for Python workloads. For more information, see [Install Python support in Visual Studio](installing-python-support-in-visual-studio.md).
@@ -91,21 +102,47 @@ If you downloaded symbols separately, follow these steps to make Visual Studio a
91
102
> [!NOTE]
92
103
> If you installed symbols by using the Python 3.5 or later installer, Visual Studio finds the symbols automatically. You don't need to complete the steps in this section.
93
104
94
-
1. Select **Tools** > **Options**, and open the **Debugging** > **Symbols** tab.
105
+
:::moniker range="visualstudio"
106
+
107
+
1. Open the **Tools** > **Options** pane and expand the **All Settings** > **Debugging** > **Symbols** > **Search Locations** section.
108
+
109
+
1. On the toolbar for the **Symbol file (.pdb) locations** list, select **+ Add**.
110
+
111
+
1. In the **Add item** dialog, enter the folder path where you extracted the downloaded symbols, and then select **Save**.
112
+
113
+
Specify the location where the _python.pdb_ file is located, such as *c:\python34\Symbols*, as shown in the following image.
95
114
96
-
1. Select **Add** (plus symbol) on the toolbar.
115
+
:::image type="content" source="media/visualstudio/mixed-mode-debugging-symbols.png" border="false" alt-text="Screenshot that shows how to specify the location of the Python mixed mode debugger symbols.":::
97
116
98
-
1. Enter the folder path where you extracted the downloaded symbols. This location is where the `python.pdb` file is located, such as *c:\python34\Symbols*, as shown in the following image.
117
+
:::moniker-end
118
+
:::moniker range="<=vs-2022"
119
+
120
+
1. Open the **Tools** > **Options** dialog and expand the **Debugging** > **Symbols** section.
121
+
122
+
1. On the toolbar for the **Symbol file (.pdb) search locations** list, select **Add** (plus symbol).
123
+
124
+
1. In the list, enter the folder path where you extracted the downloaded symbols, and then select **OK**.
125
+
126
+
Specify the location where the _python.pdb_ file is located, such as *c:\python34\Symbols*, as shown in the following image.
99
127
100
128
:::image type="content" source="media/mixed-mode-debugging-symbols.png" alt-text="Screenshot that shows the mixed mode debugger symbols options on the Tools Options Debugging dialog." lightbox="media/mixed-mode-debugging-symbols.png" border="false":::
101
129
102
-
1. Select **OK**.
130
+
:::moniker-end
103
131
104
132
During a debugging session, Visual Studio might also prompt you for the location of a source file for the Python interpreter. If you downloaded source files, such as from [python.org/downloads/](https://www.python.org/downloads/), you can point Visual Studio to the downloaded files.
105
133
106
134
### Symbol caching options
107
135
108
-
The **Tools** > **Options**, **Debugging** > **Symbols** dialog also contains options to configure symbol caching. Visual Studio uses the symbol caching features to create a local cache of symbols obtained from an online source.
136
+
:::moniker range="visualstudio"
137
+
138
+
The **All Settings** > **Debugging** > **Symbols** section supports other options for configuring symbol caching in the **Search Locations** and **Search and Load** subsections. Visual Studio uses the symbol caching features to create a local cache of symbols obtained from an online source.
139
+
140
+
:::moniker-end
141
+
:::moniker range="<=vs-2022"
142
+
143
+
The **Debugging** > **Symbols** section supports other options for configuring symbol caching. Visual Studio uses the symbol caching features to create a local cache of symbols obtained from an online source.
144
+
145
+
:::moniker-end
109
146
110
147
These features aren't needed with the Python interpreter symbols because symbols are already present locally. For more information, see [Specify symbols and source files in the Visual Studio debugger](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md).
0 commit comments