I have never used CodeBlocks, but if a debugger wants to debug STL, it definitely needs a plug-in. A simple GDB or VC debugger will not work, and you need to add a plug-in. Because the internal implementation of each STL is different, for libstdc++, https://github.com/egmkang/gdb_printers__python If you are using libc++, you can see https://github.com/egmkang/pretty_printer_for_libcxx, The latter one was written by me
I searched it for you, I’m really too lazy http://www.cnblogs.com/wanglikai91/archive/2011/11/08/2241432.html
If you use VC++2010 or above, the problem will be very simple. VC++'s debugger allows you to customize the appearance of the debugger when viewing element content, and it already comes with settings for STL . When you move the mouse over a container, it will directly tell you the contents of all containers. So @emgkang's answer says "Neither a simple GDB nor a VC debugger will work", which is wrong.
I also wrote my own container class for some reason, and then used this xml to solve this problem. You only need to search for stl.natvis in the C drive, paste the file in the same folder, restart VC++, and your own class library plug-in will be ready. It is recommended that the questioner give it a try, use advanced tools, and don’t get hung up on CodeBlocks.
I have never used CodeBlocks, but if a debugger wants to debug STL, it definitely needs a plug-in. A simple GDB or VC debugger will not work, and you need to add a plug-in.
Because the internal implementation of each STL is different, for libstdc++, https://github.com/egmkang/gdb_printers__python
If you are using libc++, you can see https://github.com/egmkang/pretty_printer_for_libcxx, The latter one was written by me
I searched it for you, I’m really too lazy
http://www.cnblogs.com/wanglikai91/archive/2011/11/08/2241432.html
If you use VC++2010 or above, the problem will be very simple. VC++'s debugger allows you to customize the appearance of the debugger when viewing element content, and it already comes with settings for STL . When you move the mouse over a container, it will directly tell you the contents of all containers. So @emgkang's answer says "Neither a simple GDB nor a VC debugger will work", which is wrong.
I also wrote my own container class for some reason, and then used this xml to solve this problem. You only need to search for stl.natvis in the C drive, paste the file in the same folder, restart VC++, and your own class library plug-in will be ready. It is recommended that the questioner give it a try, use advanced tools, and don’t get hung up on CodeBlocks.
https://github.com/vczh-libraries/Vlpp/blob/master/Release/vlpp.natvis