VSCode设置terminal路径默认为文件所在路径
打开File-Preferences-Settings:
在Terminal> Integrated:Cwd中输入${fileDirname}
这样就能保证每次打开terminal,路径都在打开的文件所在的文件夹下。
搜索栏中再输入python.terminal.executeInFileDir
这样就能保证运行目录在运行文件所在的文件夹下。
打开File-Preferences-Settings:
在Terminal> Integrated:Cwd中输入${fileDirname}
这样就能保证每次打开terminal,路径都在打开的文件所在的文件夹下。
搜索栏中再输入python.terminal.executeInFileDir
这样就能保证运行目录在运行文件所在的文件夹下。