Don't catch exceptions when running in the debugger, but do catch them otherwise?
See original GitHub issueChecklist
- Checked Support page
Is your feature request related to a problem? Please describe. We love your test adapter and use it often. A typical use case is:
- execute the tests (
GTEST_CATCH_EXCEPTIONS=1
) - check which tests fail
- execute the failing tests in the debugger (
GTEST_CATCH_EXCEPTIONS=0
)
To do this, we currently have to change GTEST_CATCH_EXCEPTIONS
between “normal” test runs and debugger test runs. We do that in .vscode/settings.json
but its not very convenient:
"testMate.cpp.test.advancedExecutables": [
{
"name": "${filename}",
"description": "(Test)",
"cwd": "${absDirpath}",
"env": {
"GTEST_CATCH_EXCEPTIONS" : "0"
}
}
Describe the solution you’d like It would be great if this use case could be supported more “automatic”. For example, there could be different environment settings when using the debugger versus when not using the debugger?
Describe alternatives you’ve considered
I tried to override GTEST_CATCH_EXCEPTIONS
in testMate.cpp.debug.configTemplate
. But I do not understand how I can append to the environment variables. I need to append so that the rest of the environment is correctly inherited. There are the esttings "env": "${envObj}"
and "environment": "${envObjArray}"
. How could I append or override GTEST_CATCH_EXCEPTIONS
in these settings? I could not get something like the following to work:
"env": {
"${envObj}",
"GTEST_CATCH_EXCEPTIONS=0"
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Similar
Note for the seeker
This can come from launch.json too. So if you have a config in launch.json which is recognized by the extension then
"testMate.cpp.debug.setEnv"
can be added there too and should work.