Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: killerbot on August 17, 2016, 10:38:54 am

Title: debugger inconsistencies
Post by: killerbot on August 17, 2016, 10:38:54 am
Very often our debugger (tooltip or add watch) refuses to show the value of a watched variable.

I now have a case where I have even inconsistencies in this behavior.

I have a class, and have the breakpoint in the body of the constructor.

That constructor :
- one of it's arguments : const std::vector<std::string>& multicastInterfaces    ==> watching this one fails (similar error messages and the one being presented below)
- in it's init list : mMulticastInterfaces(multicastInterfaces)  (const std::vector<std::string> mMulticastInterfaces)
- watching mMulticastInterfaces fails (tooltip) or by adding it to the watch list (it has size 2 and capacity 2) :
Quote
Couldn't find method std::__debug::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::c_str
- how ever when adding to the watch window (*this) and expanding it the member mMulticastInterfaces is nicely shown !!!! (std::__debug::vector of length 2, capacity 2, and the 2 entries)

could this debugging experience be improved, my personal feeling is, such things seem to happen a lot.
Title: Re: debugger inconsistencies
Post by: oBFusCATed on August 17, 2016, 08:26:21 pm
Can you post minimal sample and steps to reproduce?
It seems you're using pretty printers. Which version of gdb/gcc/os are you using?