Debugging with std objects
Answered
Hi,
I'm having trouble when debugging a Visual Studio compiled application.
It's very hard to debug std based variables (such as std::string, std::vector, std::map...)
CLion debugger doesn't allow viewing the content of some of these variables, or the value is hidden in the much deeper level in the debug tree.
See the attached screenshots for a simple string and vector of strings and the debug views as appears in CLion & Visual Studio 2017.
Is there a way to improve or simplify the debugger view for these basic types?
Best Regards,
Alon
Code example:
Debug using CLion
Debug using VS
Please sign in to leave a comment.
Hello!
Please provide a screenshot of `File | Settings | Build, Execution, Deployment | Toolchains` (please capture the screenshot after the compiler detection is completed).
Hi,
See attached.
I'm using the visual studio 2017 configuration with CMake options: -G "Visual Studio 15 2017 Win64" -T host=x64 -DCMAKE_BUILD_TYPE=Debug
In CLion 2020.3 on Windows with the following MSVC toolchain
and "Visual Studio 15 2017" generator
I got the following:
Hi,
I'm not sure if this is related, but I'm using VS 2017 community version + BuildTools (copied to a Professional named folder for a different reason)
I'm still getting the same results as before (using CLion 2020.3) with the following attached demo:
That might be the issue. BuildTools doesn't contain native visualizers required to render STL containers.
So how can I fix this?
You need to have a proper Visual Studio installation (Community or Professional version) which includes native visualizers.
Great, thanks