https://www.zhihu.com/question/452286183/answer/1813718175?ivk_sa=1024320u
https://blog.csdn.net/kz2313456/article/details/115715192
方法1:
沒那么麻煩,我也遇到了這種情況。
解決方法:
先打開vscode,左上角文件--打開文件夾--選擇.py在的文件夾--在vscode左冊的目錄再打開.py--ok
方法2:
{ // 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: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", } ] }