为什么 Python 在 Visual Studio 中加载速度极慢?

Why is Python loading extremely slowly in Visual Studio?

我的输出包含数百行,如下所示:

'python.exe' (Python): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\Lib\struct.py'. Module was built without symbols. 'python.exe' (Python): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\Lib\ctypes\_endian.py'. Module was built without symbols. 'python.exe' (Python): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\Lib\glob.py'. Module was built without symbols. 'python.exe' (Python): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\Lib\fnmatch.py'. Module was built without symbols. 'python.exe' (Python): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_86\Lib\posixpath.py'. Module was built without symbols.

需要一两分钟才能找到我的代码。它似乎加载的方式超出了必要的范围,包括仅与我导入的内容相关的利基库(仅 pyqtgraph)。

我尝试了各种解决方案,排除符号,并尝试指定模块。 Options > Debug 中似乎没有明确的设置来解决这个问题。我应该注意,我相信这是在为我正在使用的 C++ 扩展启用本机调试之后发生的。

截至目前,在 PTVS 中调试本机代码时目前没有“Just My Code”调试选项(Python for Visual Studio)。