Python在VSCode上调试

打开.vscode文件夹

点击launch.json

将这段代码添加到configurations集合里面去

{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceFolder}",
"env": {},
"envFile": "${workspaceFolder}/.env",
"debugOptions": [
"RedirectOutput"
]
},
 
之后和vs一样  设置断点,F5调试

猜你喜欢

转载自www.cnblogs.com/Y-C-F/p/9055935.html