【发布时间】:2021-07-21 02:19:33
【问题描述】:
所以,我知道之前有一篇关于此的帖子:Debugger Not Stopping at Breakpoints in VS Code for Python
但是,我在较新版本的 VSCode 上遇到了完全相同的问题。
我的设置:
- Manjaro Linux
- 官方 MS VSCode (1.55.2)
- 添加了 Python 扩展,并且大部分是默认的(下面是我与 python 相关的 settings.json 设置)
"[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" - 这是我的 launch.json 设置:
{ // 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 } ] }
【问题讨论】:
-
有python代码不生成Python VM指令,它们被优化掉了,没有代码有我们无法帮助的工件,反汇编最小的代码有问题
-
我什至只是放了一个简单的'print("Hello World")',仍然给我同样的问题
-
请尝试VSCode Insider。
标签: python visual-studio-code vscode-settings vscode-debugger