Closed andreucv closed 1 week ago
(corrected)
These variables are available: https://github.com/matepek/vscode-catch2-test-adapter/blob/3dc483b012d34d6f80ff76a19b70144caec6c34b/src/WorkspaceManager.ts/#L351-L359
And I can make these available relatively easy: - https://github.com/matepek/vscode-catch2-test-adapter/blob/3dc483b012d34d6f80ff76a19b70144caec6c34b/src/WorkspaceManager.ts/#L450-L476
IF the preLaunchTask is inside the debugConfig then both set should be available already. But as you tried it does not work but thats on the debugger not on the extension.
Ah, got confused. That works for the
"runTask" {
"before": ["task"],
}
only.
What you can use from any tasks are ${testMate.cmd.get-debug-exec}
and ${testMate.cmd.get-debug-args}
.
(forgot about this functionality, hehhe)
Checklist
Describe the bug
Situation: To run a GTest binary I create a docker container with the sdk and the toolchain needed to execute it. I created a wrapper to execute them using your extension, and it works good. I build multiple GTest binaries from different components in my repository. In order to improve performance, how I do it is to maintain the docker container started, and use the
executionWrapper
setting to execute the GTest binary using adocker exec container_id sh -c ./gtest_component_name_binary
.Problem: Then, as a next step, I want to apply the debug configuration. I'm blocked, as to be able to debug, when I am clicking on the test's debug button I need to start a gdbserver session for the GTest binary selected (I thought on using the
${parentLabel}
which I set to be the GTest binary name). I thought on doing that on thepreLaunchTask
.However, I have not found any way to pass parameters to the
preLaunchTask
, as it can only be set as a name of a task insidetasks.json
, and I cannot pass the binary name or the testname to do it automatically. I would like to avoid any other user interaction. Do you know how I could do that?To Reproduce
Desktop
How I use
debug.configTemplate
:How I thought it could be used (and doesn't work, this task is not recognized as a task):