[英]Why is VSCode not stopping at breakpoints for debugging?
So, I know there is this previous posting about this: Debugger Not Stopping at Breakpoints in VS Code for Python所以,我知道之前有一篇关于这个的帖子: Debugger Not Stopping at Breakpoints in VS Code for Python
However, I'm having the exact same issue on a newer version of VSCode.但是,我在较新版本的 VSCode 上遇到了完全相同的问题。
My setup:我的设置:
"[python]": { "editor.detectIndentation": true, "editor.insertSpaces": true }, "python.autoComplete.addBrackets": true, "python.linting.flake8Args": [ "--ignore=F401,F841,E501,E305,E302" ], "python.linting.flake8Enabled": true, "python.venvPath": "/home/greg/git/code/python/venvs"
{ // 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: Debug Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "stopOnEntry": true, "justMyCode": false } ] }
Try:尝试:
launch.json
from the project (save it somewhere else in case you need it)launch.json
(将其保存在其他地方以备不时之需)launch.json
, just go with the defaults.launch.json
,只需 go 使用默认值。 If you place breakpoint on BLANK LINE, or a line with only comments it will not work.如果您在空白行或只有注释的行上放置断点,它将不起作用。
Place your breakpoint on a LINE THAT HAS CODE.将断点放在有代码的行上。
You're welcome别客气
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.