Open devshgraphicsprogramming opened 5 years ago
I'm having the same issue.
Set "cwd": "${workspaceFolder}/build/",
in my launch.json but when I press CTRL
+ F5
the project is started from the root of the workspace
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.
Just encountered this bug as well, hoping for a fix.
@billgan1024 @devshgraphicsprogramming What generator are you using for this project?
The design of the VS_DEBUGGER_WORKING_DIRECTORY was initially designed only for the VS generators, it's also tracked here for VS: https://developercommunity.visualstudio.com/t/CMake-integration-does-not-use-VS_DEBUGG/10661022, and Kitware themselves here: https://gitlab.kitware.com/cmake/cmake/-/issues/16478.
If it's not working for even the VS generators, we should likely look into this. More generically, there will be enhancements made in Kitware CMake.
Its a 5 year old issue, but @AnastaZIuk probably knows if it still affects us
Brief Issue Summary
The debugger and run-without-debugger (run in terminal) do not honour the working directory set for individual targets.
Expected:
Both debugger and run-without-debugger run my target from the specified (by VS_DEBUGGER_WORKING_DIRECTORY) working directory.
Apparent Behavior:
Debugger and Run-In-Terminal both attempt to run my target binaries from the root directory of the project as the working directory.
Platform and Versions