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", } ] }