So, I know there is this previous posting about this: Debugger Not Stopping at Breakpoints in VS Code for Python
However, I'm having the exact same issue on a newer version of 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
, just go with the defaults.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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.