Debuging see numbers always in HEX and string as text

General questions regarding the usage of CodeLite
gkourtis
CodeLite Enthusiast
Posts: 18
Joined: Sat Jan 25, 2014 9:16 pm
Genuine User: Yes
IDE Question: C++
Contact:

Debuging see numbers always in HEX and string as text

Post by gkourtis »

During debugging in codelite I need to see numbers always as hexadecimal.
I need to keep sets of variables created in the watch panel.
I need to see variables of type string or wstring as the contained string without need to expand the variable.
And I need also not to have two separate views for locals and watch but only one !!

HOW DO I DO IT

My OS is ubuntu uname gives:
3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Last edited by gkourtis on Sat Jan 25, 2014 10:43 pm, edited 2 times in total.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debuging see numbers always in HEX and string as text

Post by eranif »

gkourtis wrote:During debugging in codelite I need to see numbers always as hexadecimal.
I need to keep sets of variables created in the watch panel.
I need to see variables of type string or wstring as the contained string without need to expand the variable.
HOW DO I DO IT
You forgot to mention your OS/codelite version etc

To be able to view the string properly (without expanding it) you need to enable python pretty printing:

1. Make sure your gdb supports python pretty printing
2. From codelite's menu bar: Settings->GDB->Enable pretty printing

Note that by default codelite uses the CTRL (CMD on OSX) to enable tooltips when hovering a variable/expression

To view numbers in hex (base 16) format:
project settings->common settings->debugger->startup commands
and add this line:

Code: Select all

set output-radix 16
Note that this will affect only the current project. If you want to set it globally to affect all workspaces and projects:
settings->GDB settings->startup commands
and put the same line as above

Eran
Make sure you have read the HOW TO POST thread
gkourtis
CodeLite Enthusiast
Posts: 18
Joined: Sat Jan 25, 2014 9:16 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debuging see numbers always in HEX and string as text

Post by gkourtis »

Hex works ok
I enabled the flag but python pretty printing does not work.
What do I have to do in my platform ?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debuging see numbers always in HEX and string as text

Post by eranif »

Please read this:
HOW TO POST

Eran
Make sure you have read the HOW TO POST thread
gkourtis
CodeLite Enthusiast
Posts: 18
Joined: Sat Jan 25, 2014 9:16 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debuging see numbers always in HEX and string as text

Post by gkourtis »

OS: 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux ( I already said it before )
CodeLite 5.4 (downloaded as update )
Language used C++ ( compiler g++ and clang ).
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debuging see numbers always in HEX and string as text

Post by eranif »

From the HOW TO POST:
1) If it is a 'Debugger' related bug, make sure to also post:
The full debugger log - enable the 'full debugger logging' option, reproduce your problem and paste the output from the 'Debugger' view ("Output" tab) window to your post (from settings -> debugger settings -> GNU gdb debugger -> misc -> enable full debugger logging)
Your GDB version
Eran
Make sure you have read the HOW TO POST thread
Post Reply