Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
vscode中python的本地脚本调试_Python_Visual Studio Code - Fatal编程技术网

vscode中python的本地脚本调试

vscode中python的本地脚本调试,python,visual-studio-code,Python,Visual Studio Code,我试着按照上面提到的说明去做。根据说明,我已将这段代码添加到脚本中。接下来,我打开集成终端并运行脚本。我收到消息正在等待调试器附加 现在,我尝试按照说明的步骤6进行操作: 切换到运行视图,从调试器下拉列表中选择适当的配置,然后启动调试器 因此,我单击runanddebug按钮(图中左下角的一个),然后单击Python:attachusingprocessid(图的顶部) 但是,调试器不会被附加 我不确定哪里出错。请检查用于配置调试的文件“”的内容: { // Use IntelliSe

我试着按照上面提到的说明去做。根据说明,我已将这段代码添加到脚本中。接下来,我打开集成终端并运行脚本。我收到消息
正在等待调试器附加

现在,我尝试按照说明的步骤6进行操作:

切换到运行视图,从调试器下拉列表中选择适当的配置,然后启动调试器

因此,我单击runanddebug按钮(图中左下角的一个),然后单击
Python:attachusingprocessid
(图的顶部)

但是,调试器不会被附加


我不确定哪里出错。

请检查用于配置调试的文件“”的内容:

{
    // 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",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console":"integratedTerminal",
            
        }
    ]
}
然后单击F5:代码保持在“
debugpy.breakpoint()
”处,如文档中所述