-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a command that returns the resolved value of cmake.buildDirectory #695
Comments
The config build directory is the expansion template for cmake extension. It is used to generate the build directory. If you want to get the directory for debugging then try the lauchTargetDirectory. |
Thanks for the answer. I can not use launchTargetDirectory as I have multiple targets in my project. The launch.json has several targets listed. Example launch.json:
Using ${config:cmake.buildDirectory} isn't working. Any solution for that? |
With the present extension it is not possible. It requires a new command. |
Thanks for the fast response. Anything I need to do to open a feature request? Or is this open issue already enough? |
Do you need to list out all of your targets in the The following works for me today:
It looks like If that doesn't work for you, we can leave this issue open as a feature request for a new command to return the resolved build directory. |
The launchTargetDirectory is not always the same as the buildDirectory. For example, if I have multiple targets in my project, I will get a subdirectory:
The build directory would be
|
@giantmustache, you are correct. There are cases where the build directory might be desirable, but for the simple case |
I was able to work around this using vs power tools. For those looking for an answer: I created a new command in my workspace settings like so:
Then I created the command as follows:
You can call the command simply via |
As I have been reviewing the existing issues, I found that there is already one tracking this request. #564 |
Brief Issue Summary
Using ${config:cmake.buildDirectory} in launch.json with visual cpp debugger doesn't work. After a successful cmake configure the ${config:cmake.buildDirectory} is not correctly resolved. In my example in settings.json the cmake.buildDirectory looks like this:
"cmake.buildDirectory": "${workspaceFolder}/../CMakeBuild/vscode/NSW-51770/${buildKit}/${buildType}",
The ${buildKit} and ${buildType} are not resolved but just copied into the resulting string.
Expected:
cmake.buildDirectory is correctly resolved
Platform and Versions
The text was updated successfully, but these errors were encountered: