Hi,
Indeed, the VisualGDB CMake projects use a different template mechanism, so it allows adding targets or individual source files, but not whole classes. As a workaround, please consider adding a pair of .cpp and .h files and declaring a class there manually. You can then rely on VisualGDB’s IntelliSense to generate most redundant code for you:
- Once you type in the constructor declaration (e.g. ‘MyClass();’), press Ctrl+. and select “Create a definition”. It will insert the “MyClass::MyClass() {}” part in the .cpp file
- Whenever you want to add a new method to the class, you can try just calling it from the code as if it was there, and then use the “Create from use” command, that will determine the names and types of the arguments based on the values you passed.
Regarding the Visual Studio versions, VisualGDB replaces a lot of the Visual Studio GUI and functionality with its own implementations, and the parts that are not replaced (tab docking, breakpoint/watch GUI), have not changed much between VS2017 and VS2022. On the other hand, VS2019 and VS2022 feature a lot of improvements for the C# development, so if you are occasionally developing C# code, it could be worthwhile checking them out.