Unable to inspect the STL containers during debug Follow
I have a problem inspecting any kind of stl containers.std:string, std:vector , everything I have tried I can't inspect the contents.
Following this https://blog.jetbrains.com/clion/2015/02/clion-eap-news-cmake-3-1-stl-renderers-in-debugger-pty-and-more/ it is supposed that I get a pretty render of a container
which is exactly what I was expecting.
In my case though it seems that I get the raw contents of the vector.Here is what I get
I use MinGw in Windows 10 and cmake.
I am sure that I am missing something fundamental.But I spend the whole day trying to figure out what I am missing.Any ideas?
Please sign in to leave a comment.
Does it work for simple std::vector<int>? Could you please provide a self-contained code sample with which the issue can be reproduced?
Yes I get the same with a simple std::vector<int>.
The code for this is just an simple example :
Account class is a simple normal class
Thank you for the details! I can reproduce the issue only with MinGW. In case of MinGW-64 or Cygwin it works fine. Is it possible for you to switch to MinGW-64 or Cygwin?
Seems OK using cygwin. However my compiler is MinGW-64.Are there any clues why this happens for MinGW?
Please provide the screenshot of File | Settings | Build, Execution, Deployment | Toolchains so that I could see your MinGW-64 version and the GDB version.
I had the same issue. I think there is some regression on 2019. I changed laptop recently and reinstalled everything on windows 10, so I migrated from 2018 to 2019. And now, I can't see vector content anymore on debugging. Problem disapeared when I switched back to 2018.
@Bruno Marcon, what toolchain and OS do you use? What debugger do you use - bundled or other?
Hi Anna. I use MinGW on Windows 10
Is it MinGW, not MinGW-64?
Have you tried using the bundled GDB? I can't reproduce the issue with MinGW and the bundled GDB:
I did'nt change anything in the setting concerning debugger, so I think it is the bundledGDB. I unisinstalled 2019 so I couldn't reproduce the bug anymore.
I think it is MinGW64
I saw exactly the same thing as Ftsakiroglou in the post Created April 12, 2019 15:27
Unfortunately, neither @Ftsakiroglou, nor you have provided accurate version information about toolchain and debugger. And I can't reproduce the issue on my side without this information.
I have exactly the same problem.
I run CLion 2019.2.1 in docker build on Alpine 3.9.2. Thus I cannot use bundled LLDB:
So I use gdb 8.2:
The problem is with any STL container, vector, map etc. It does not matter if type is simple int or some complex structure.
I am sure the functionality worked fine before 2019.1.2. But we used CentOS then, so I don't know if problem occurred after our migration to Alpine, or after updating CLion from 2018 to 2019
This is quite urgent for me, make it extremely difficult to debug my software.
@Wichur, for bundled GDB do you also get "Does not work in this environment"?
I have the same problem with the following configuration:
@David please send a self-contained code sample, a screenshot illustrating the problem and the debugger log to clion-support at jetbrains.com. To create the log, please enable debugger logging as described here, reproduce the issue and get the resulting idea.log file (`Help | Show Log in ...`). Do not forget to disable debug logging after that. Note that logs might contain private user's information (like file paths and names).
I will give you a brief description with bundled gdb & Platform Windows 10 x64
Macxfadz, you have the same problem as I had. Apparently, it doesn't work, because the MinGW64 distribution at https://nuwen.net/mingw.html does not contain the python support, which is required for the "pretty" debugger to work. You can solve it by installing the official MinGW64 distro from Sourceforge.
I have the official MingW64 version and it behaves the same as Macxfadz wrote.
Please provide assistant
David Fido Fiedler I tried officials once too not working same behavior as I explained, I agree with Dror Rejwan
Experiencing this issue with the VisualStudio tool chain as well. Can't debug simple vector<int>.
(note that everything here loads, it just refreshes every time I use the win10 Snipping Tool to take a screenshot...)
@Winrid, for the Visual Studio C++ toolchain, STL native visualizers are taken from the Visual Studio installation. Do you have the "Enable NatVis renderers for LLDB" option enabled in File | Settings | Build, Execution, Deployment | Debugger | Data Views | C/C++?
I can't reproduce the issue with this option enabled:
As for MinGW
I have the following MinGW-w64 version:
And std::vector looks ok in CLion 2020.1.1:
MinGW-w64 was installed using the MinGW-W64 Online Installer (MinGW-W64-install.exe) downloaded from https://sourceforge.net/projects/mingw-w64/files/
The MingW version you are using does not support std threads.
I think CLion should be shipped with a fully working MingW and a decent package manager.
>I think CLion should be shipped with a fully working MingW and a decent package manager.
There are some concerns to be solved with licensing, distribution sizes, etc, so it's not our immediate priority, unfortunately.
For now I can suggest you either to find GDB which is built with Python support, or to use another toolchain (MSVC with the bundled LLDB, or MinGW 32-bit version with the bundled GDB; not suggesting Cygwin because you already told that it doesn't suit your needs).
For everyone who observes this issue with MinGW:
It means that GDB you use is not built with Python support. You need to use a different GDB or pick another MinGW distribution.
Currently we bundle only 32-bit GDB for Windows (built with Python support). Feel free to comment or upvote a feature request about bundling 64-bit GDB for Windows: https://youtrack.jetbrains.com/issue/CPP-16363. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
Tried the distribution you offered previously offered: https://nuwen.net/mingw.html
CLion cannot even use it, does not recognize the environment.
Even after manually configuring make, ,gcc, c++ and gdb, still doesnt work.
Will using MSVC with the bundled LLDB allow me full debugging capabilities ?
Because as I understand it, MSVC toolchain debugging is not fully suppoted
>CLion cannot even use it, does not recognize the environment.
On my side CLion 2020.1.1 is able to detect make and compilers from mingw-17.1.exe (just downloaded it from https://nuwen.net/mingw.html) successfully, but indeed GDB provided in this distribution also doesn't work as expected.
>Will using MSVC with the bundled LLDB allow me full debugging capabilities ? Because as I understand it, MSVC toolchain debugging is not fully suppoted
The LLDB-based debugger developed by JetBrains for the Visual Studio C++ toolchain had been an experimental feature previously, but in CLion 2020.1 we enabled it by default. You can check what issues it has and what features are missing in our tracker: see the "Parent for" section of https://youtrack.jetbrains.com/issue/CPP-14416 and https://youtrack.jetbrains.com/issue/CPP-20370.
Could you please provide the latest MingGW/GCC/G++ and GDB download links which compatible with CLION 2020.1.1? and not having this issue?
(It' really urgent)
Macxfadz as I mentioned earlier, MinGW-W64 GCC-8.1.0 from https://sourceforge.net/projects/mingw-w64/files/ works on my side. As far as I see, it's the latest official pre-built MinGW-W64 toolchain.
I haven't try building v7.0.0 on my own.