Python 在VSCode中进入导入的标准模块
我使用Visual Studio代码编写了以下简单代码:Python 在VSCode中进入导入的标准模块,python,visual-studio-code,Python,Visual Studio Code,我使用Visual Studio代码编写了以下简单代码: 导入副本 a=3 b=复制。复制(a) 印刷品(b) 希望在调试时看到copy.py的内部作品 VisualStudio代码是否可以实现这一点?如果是,怎么做 我在“import copy”和copy.py(位于C:\Users\\AppData\Local\Programs\Python\Python37-32\Lib\copy.py)的第一行上放置了一个断点。Vscode在调试时默认忽略标准库 将以下内容添加到launch.json
导入副本
a=3
b=复制。复制(a)
印刷品(b)
希望在调试时看到copy.py的内部作品
VisualStudio代码是否可以实现这一点?如果是,怎么做
我在“import copy”和copy.py(位于C:\Users\\AppData\Local\Programs\Python\Python37-32\Lib\copy.py)的第一行上放置了一个断点。Vscode在调试时默认忽略标准库 将以下内容添加到
launch.json
中首选的Python调试器配置中:
"debugStdLib": true
这就是我的样子:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"debugStdLib": true
},
]
}
资料来源: