安装用于 Python 解释器的调试符号Install debugging symbols for Python interpreters
11/12/2018
本文内容
为了提供完整的调试体验,Visual Studio 中的 Python 混合模式调试器需要 Python 解释器(正在用于分析大量内部数据结构)的调试符号。To provide a full debugging experience, the mixed-mode Python debugger in Visual Studio needs debug symbols for the Python interpreter being used to parse numerous internal data structures. 例如,对于 python27.dll,相应的符号文件是 python27.pdb;对于 python36.dll,符号文件是 python36.pdb 。For python27.dll, for example, the corresponding symbol file is python27.pdb; for python36.dll, the symbol file is python36.pdb. 解释器的每个版本都提供了各种模块的符号文件。Each version of the interpreter also supplies symbol files for a variety of modules.
对于 Visual Studio 2017 及更高版本,Python 3 和 Anaconda 3 解释器会自动安装各自的符号,Visual Studio 会自动找到这些符号。With Visual Studio 2017 and later, the Python 3 and Anaconda 3 interpreters automatically install their respective symbols and Visual Studio finds those symbols automatically. 对于 Visual Studio 2015 及更早版本,或使用其他解释器时,需要单独下载符号,然后通过“调试” > “符号”选项卡中的“工具” > “选项”对话框,将 Visual Studio 指向它们 。以下各节将详细介绍这些步骤。For Visual Studio 2015 and earlier, or when using other interpreters, you need to download symbols separately and then point Visual Studio to them through the Tools > Options dialog in the Debugging > Symbols tab. These steps are detailed in the followin