背景
当我在一个python项目中的时候,每次想要运行这个train.py代码,但是有的项目用的相对路径,这个时候就很难处理(除非把所有的相对路径改成绝对路径)
解决方法
由于vscode的调试机制采用的是:在当前文件夹下处理,也就是工作目录(就是我们用vscode 打开的哪个文件夹),那么一个处理方式就是打开两个工作区
- 安装 ctrl + shift + p, 输入命令add folder to workspace,选择需要的目录
- 修改launch.json 文件进行模块调试
For further actions, you may consider blocking this person and/or reporting abuse
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.
Joris Conijn -
Mike Young -
Mike Young -
Mike Young -
Top comments (0)