User forums > Using Code::Blocks

Dubugging - Watching a String

(1/1)

VJgamer:
I have a string (string dirHome), but I cannot watch it in the debugger. I get the following message:

dirHome = Cannot resolve method string::c_str to any overloaded instance

Thank you for your time.

VJgamer:
Does nobody know what this mean. I am sorry but I am new to C++. I have been using VB, VB.NET, and C#.
Alot of people seem to dislike .NET (I am a Windows programmer.)

TDragon:
What version of Code::Blocks are you using?
What compiler are you using?
Which debugger are you using?
Is the string object in question a std::string (from the Standard C++ Library)? If not, does it have a member function c_str() returning char*?

byo:
It looks like wxString::c_str() has been optimized (to inline?) and is not available inside gdb (starting from wx2.8).
wxString-fetching script probably needs updating.

Regards
   BYO

Navigation

[0] Message Index

Go to full version