VSCode 在我的代码之前执行 cd 命令

问题描述 投票:0回答:2

enter image description here

cmd 是我的默认终端,即使在设置中我写了这样的:

  "terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",

当我使用PowerShell时,它没有运行这样的命令。我使用纯 Python 3.6 进行编码,没有 import 语句。

python-3.x visual-studio-code command-prompt
2个回答
0
投票

VS Code 将

cd
进入您为
"cwd":
中的
launch.json
属性指定的目录。此功能旨在保留 VS Code 运行启动配置的位置。


0
投票

你可能有

"python.terminal.executeInFileDir": true

设置在您的

.vscode/settings.json
文件中。

只需删除此行或将此设置设置为 false。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.