英文:
launch.json breaks debugging in VSCode
问题
I wanted to set justMyCode
to false for a python project in VSCode.
So I created a launch.json
file in a .vscode
folder under the project root folder with the following content:
{
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal", // <= adding/deleting this makes no difference
"env": {"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT": "5"}, // <= I'd like to have this too
"justMyCode": false,
}
],
"debug.allowBreakpointsEverywhere": true,
"jupyter.debugJustMyCode": false,
}
Afterwards, the debugger won't start. The code runs fine outside the debugging though.
What should I modify?
英文:
I wanted to set justMyCode
to false for a python project in VSCode.
So I created a launch.json
file in a .vscode
folder under the project root folder with the following content:
{
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal", // <== adding/deleting this makes no difference
"env": {"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT": "5"}, // <== I'd like to have this too
"justMyCode": false,
}
],
"debug.allowBreakpointsEverywhere": true,
"jupyter.debugJustMyCode": false,
}
Afterwards, the debugger won't start. The code runs fine outside the debugging tough.
What should I modify?
答案1
得分: 1
如rioV8所说,通过右上角的调试Python文件按钮进行调试将不会读取launch.json
中的配置。
您可以使用快捷键F5或单击下图中的按钮:
一些相关的补充信息:
运行选项 | .env设置 | launch.json设置 |
---|---|---|
在终端中运行Python文件 | 否 | 否 |
在交互式窗口中运行 | 是 | 否 |
通过F5进行调试 | 是 | 是 |
“调试Python文件” (*) | 是 | 否 |
英文:
As rioV8 said, debugging through the Debug Python File button in the upper right corner will not read the configuration in launch.json
.
You can use shortcuts F5 or click the following button in the picture:
Some relevant supplementary information:
Run option | .env setting | launch.json setting |
---|---|---|
Run Python file in terminal | no | no |
Run in interactive Window | yes | no |
Debug via F5 | yes | yes |
"Debug Python File" (*) | yes | no |
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论