I have been having this problem since I started using stl containers awhile ago. Basically, when I debug them with the default Code::Blocks MinGW debugger I find that it gives far too much irrelevant information such as iterators and other 'behind-the-scenes' stuff. I can make it better by telling it to watch it as an array, then t just shows the data. But now I have a vector of vectors of decent sizes, and right clicking each one and telling code::blocks to watch them as an array is just not something that I am going to do. Anybody know how to make the default Code::Blocks MinGW debugger treat stl containers like normal arrays/strings?

Recommended Answers

All 2 Replies

Visual studio has a special file called autoexp.dat that tells the debugger how to format things when it's presenting them to you. You can add your own definitions to the file, so you can have a custom presentation of pretty much any structure in the debugger. It's one of the few things that I would say is really good and unseful in VS. I don't know if anyone knows of anything similar you could use in Code::Blocks/MinGW?

I have tried other IDE's before (including VS/VBC++/Eclipse/Notepad++) and I just don't like them, I find I cannot properly program in them. I would however be agreeable to a change in compiler/debugger .exes. Is there any debugger program that just understands that a vector is an array and we don't care about the internal pointers, or for that matter that a string containing "Hello, World" should be displayed as "Hello, World", not as <internal_data_pointer> <no entries> or whatever it says.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.