vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Launch target with no debugger - requested settings

Open dprandle opened this issue 7 years ago • 3 comments

Brief Issue Summary

Most often I use the command "Execute the current target without a debugger" and just examine core dumps on crashes - unless I'm looking for something specific.

Is there any way to set the CWD or any of the environment variables for launching the target without the debugger? I see that it opens the program from the workspace directory - I'd prefer the cwd to be my build directory where the executable is located.

Thanks!

dprandle avatar Jan 14 '19 22:01 dprandle

I would like this too please. I can't seem to find the command that VSCode performs from "Debug->Start Without Debugging" so that I can bind a key to it. Shift f5 seems to execute some unrecognised msbuild /property:GenerateFullPaths=true /t:build command

DavidRobb avatar Jan 31 '19 10:01 DavidRobb

The command description is something like "Launch target without debugger" - ctrl+p and type cmake and you should be able to find the actual command name.

For now I have been using a task runner with ${command:cmake.launchTargetPath} to give the command to launch the target - I can then set the env, cwd, and args however I like. The downside of this is that I use the buildType variable in my build path (ie build/Debug/bin and build/Release/bin) so there is no way to set the cwd to the bin folder. For now I just set it to the build folder.

The easiest solution, in terms of ease-of-use, would be to allow configuring the target being launched without the debugger with args, env, and cwd - this should be configurable at the global level and per project.

With task runners you gotta create one for every project.

dprandle avatar Jan 31 '19 18:01 dprandle

Let us know if you still need extra support from the CMake Tools extension for the launch without a debugger scenario. We are closing this issue for now.

andreeis avatar Apr 28 '20 16:04 andreeis