Locals view and hovering view of std::string

General questions regarding the usage of CodeLite
Arbalest
CodeLite Enthusiast
Posts: 30
Joined: Wed Oct 03, 2012 6:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Locals view and hovering view of std::string

Post by Arbalest »

CodeLite 5.1 Ubuntu 12.4 under VmPlayer

I followed the instructions in another post regarding the debugger check box for "Use predefined types..."

But still when I look at a string contained within a class I first see lots of std::string internal information and (if I even can) I have to scroll horizontally very far to see what the actual string value. Is this setting supposed to cause the display of just the "payload" of the string?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Locals view and hovering view of std::string

Post by eranif »

Use codelite 5.2, and then enable 'Settings -> GDB Settings -> General' and tick the option 'Enable GDB Pretty Printing'

Eran
Make sure you have read the HOW TO POST thread
Arbalest
CodeLite Enthusiast
Posts: 30
Joined: Wed Oct 03, 2012 6:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Locals view and hovering view of std::string

Post by Arbalest »

I've finally upgraded to 5.2 and have ticked "predefined types" and "pretty printing".

But I still have to expand a string about 5 levels before I see it's contents. Is this the intended behavior, or I do I need to to change some other settings?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Locals view and hovering view of std::string

Post by eranif »

to be able to view std::string you should have a gdb with python enabled.
Eran
Make sure you have read the HOW TO POST thread
Arbalest
CodeLite Enthusiast
Posts: 30
Joined: Wed Oct 03, 2012 6:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Locals view and hovering view of std::string

Post by Arbalest »

Under "debugger settings" I don't see any specific option to enable Python. But, on the "startup commands" panel the first line is "python".

Is there something else that needs to be done?
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

Re: Locals view and hovering view of std::string

Post by petah »

I used to have the same problem which I resolved by checking the above-mentioned options and unchecking "Auto cast 'car[] into 'char*'".

I have different CL versions on different PCs though, incl. different wx builds (that may or not use std::string for wxString), so there are a number of factors involved, but never came across a show-stopper.

cheers,

-- p
main: Debian Jessie x64 + custom wxTrunk
Post Reply