Debugger display bits

Answered

Is there a way to make the debugger display the binary representation of a number instead of the decimal one? I need this to effectively debug code that uses integers as bitsets rather than actual numbers.

In InteliJ IDEA for Java I'd add a watch or a custom renderer with Integer.toString(this, 2), is there a similar solution for CLion?

0
3 comments

Hi! We have a feature request in our tracker, which is mostly about the hexadecimal format, but has some comments about the binary format also. Please feel free to comment or upvote it.

1

Hmm thanks, too bad this (seemingly) basic functionality isn't implemented yet.

 

As for the workaround discussed in that issue, https://youtrack.jetbrains.com/issue/CPP-11047#comment=27-2166349, it requires (lldb) commands, where would I put those? In the debugger I only have a GDB command line. I'm on Windows 10, MinGW version 5.0.

0

Hi, Karel!

Have you tried this workaround suggested for GDB?

0

Please sign in to leave a comment.