VSCode 更改默认Debug 运行路径为代码所在目录

问题描述

vscode debug c++时,生成exe 放在指定地址,是在编译时设置(tasks.json中), debug时是在launch.json

json 文件中的cwd 是设置执行命令时的 路径。 如果如果生成的exe,和 代码 不再同一个目录下,需要在launch.json中修改cwd值。

posted @ 2024-06-03 14:01  BISTER  阅读(305)  评论(0)    收藏  举报