cmd 是我的默认终端,即使在设置中我写了这样的:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
当我使用PowerShell时,它没有运行这样的命令。我使用纯 Python 3.6 进行编码,没有 import 语句。
VS Code 将
cd
进入您为 "cwd":
中的 launch.json
属性指定的目录。此功能旨在保留 VS Code 运行启动配置的位置。
你可能有
"python.terminal.executeInFileDir": true
设置在您的
.vscode/settings.json
文件中。
只需删除此行或将此设置设置为 false。