Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Krause on January 25, 2023, 03:35:14 pm

Title: Variable names in Watches window
Post by: Krause on January 25, 2023, 03:35:14 pm
Sometimes variables in the Watches window are shown like this:
Code
i
and sometimes as expected: i
And also the debugger log has additional characters before the address:
Code
Setting breakpoints
Breakpoint 2 at 0x1400019f2: file c:\dev\Test\GUIFrame.cpp, line 46.
I'm using GDB 10.2/Win11.

What is going wrong?

Thanks in advance
K.
Title: Re: Variable names in Watches window
Post by: Miguel Gimenez on January 25, 2023, 03:46:13 pm
Looks like GDB is generating ANSI escape sequences (https://duffney.io/usingansiescapesequencespowershell/),

Adding
Code
set style enabled off
to GDB initialization commands (in Settings -> Debugger -> Default) should fix the issue.

EDIT: I have just created a ticket (https://sourceforge.net/p/codeblocks/tickets/1366/) for this.
Title: Re: Variable names in Watches window
Post by: Krause on January 26, 2023, 07:51:55 am
Thanks. That works.

K.