testMate.cpp.debug.configTemplate Setting Shows Incorrect Warning About Missing "Type" Property
See original GitHub issueChecklist
- The issue is about this extension and NOT about a fork.
- Check the known issues list.
- The latest version of the extension was used.
- It is not related to remote-vscode or I checked the following issue
Describe the bug
The testMate.cpp.debug.configTemplate
setting complains about a missing “type” property in the schema file of settings.json, but the property is not required if it is set to behave differently per platform. For example, our project has this:
"testMate.cpp.debug.configTemplate": {
"linux": { "type": "lldb" },
"osx": { "type": "lldb" },
"windows": { "type": "cppvsdbg" },
"program": "${exec}",
"args": "${argsArray}",
"cwd": "${cwd}",
"env": "${envObj}",
"environment": "${envObjArray}"
}
This way, we use the VS debugger on Windows and lldb on Linux and OSX. This works functionally without an issue, which is fantastic for our scenario! The only problem is the settings.json file shows a warning: Missing property "type".
See the screenshot pasted below.
To Reproduce
Set the testMate.cpp.debug.configTemplate
mentioned above.
Screenshots (optional)
Desktop
- Extension Version: v3.6.24
- VS Code Version: 1.55.2
- Catch2 / Google Test / DOCTest Version: Google Test - 1.10.0
- OS Type and Version: Windows 10/Debian
- Using remote-ssh/docker/wsl?: Local and Docker
Regression bug?
Not that I know of, since this is the first time I’m using the setting 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
vscode-catch2-test-adapter/debug.configTemplate.md at master
It will choose the first one which's "request" property is "launch" and has type property with string value starting with cpp , lldb...
Read more >C++ TestMate - Visual Studio Marketplace
This extension allows you to run your Catch2, Google Test and DOCtest tests using the native testing vscode-api. It also have basic support...
Read more >How to set up C++ Testmate in VS Code - Stack Overflow
To troubleshoot #2 and #3 you can turn on debug logging for the extension (again, in the VSCode's config json), this will cause...
Read more >Debug a C++ project in VS Code - YouTube
This video walks you through the steps to debug a C++ project in Visual Studio Code. Find more "Hello World" tutorials for building...
Read more >Working with Visual Studio Code — OpenPASS Documentation
Correctly configured Visual Studio Code showing – among other things – left, debugging, testmate, and cmake pane selectors, and at the bottom, build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay so I’ve discovered that this platform-specific settings doesn’t work for
configTemplate
at all. I’m fixing itHello, In theory you are right but… it’s hard to implement in that way. One can silence the value with creating a dummy
type
value:Like:
Since all the platform versions will overwrite anyway it will work just fine. Other option is to overwrite it on windows only:
I could make it an optional but (I think) most of my users uses it on only 1 platform and for them the warning is actually helpful.
I will update the documentation. I like that you read it. My effort to write it wasn’t in vain. 😃
If you have other suggestion don’t hold it back 😃