You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although you can refer to various CMake (vector-of-bool plugin) settings in launch.json, they cannot contain any variables. For example, in a launch.json, it is valid to write:
If this is done, when you attempt to launch the program, it will look for folders literally named ${buildKit}/${buildType} without substitution, which will of course fail. This means you can't use any relative paths in the cmake variables if they appear in the launch.json.
Expected:
When launching an application, VSCode would properly substitude paths for variables such as ${buildKit} or ${buildType}
Apparent Behavior:
When launching an application, VSCode treats cmake variables as string literals.
Platform and Versions
Operating System: Windows 10 or Ubuntu 18.04
CMake Version: 3.12 or 3.14
VSCode Version: 1.44.0
CMake Tools Extension Version: 1.3.1
The text was updated successfully, but these errors were encountered:
No, I'm not sure exactly what it does if you use ${command:cmake.buildKit}/${command:cmake.buildType}. It seems to replace the entire contents of what is in " " with an absolute path of just "build" or something like that. It definitely doesn't just substitute the variables. I'll see if I can figure out what it's doing in a test project without messing with the build folder of the main project.
But, the tip of command:cmake.launchTargetPath is very helpful! That might resolve my use case although not really this bug.
Brief Issue Summary
Although you can refer to various CMake (vector-of-bool plugin) settings in launch.json, they cannot contain any variables. For example, in a launch.json, it is valid to write:
However, if the cmake.buildDirectory contains any variables itself, this will not work. For example:
If this is done, when you attempt to launch the program, it will look for folders literally named ${buildKit}/${buildType} without substitution, which will of course fail. This means you can't use any relative paths in the cmake variables if they appear in the launch.json.
Expected:
When launching an application, VSCode would properly substitude paths for variables such as ${buildKit} or ${buildType}
Apparent Behavior:
When launching an application, VSCode treats cmake variables as string literals.
Platform and Versions
The text was updated successfully, but these errors were encountered: