Can PyCharm display variable value as hexadecimal number?

Viewed 1357

I'm debugging a python script in PyCharm and can't find a way to display integer values as hexadecimal numbers. Is it at all possible in this IDE?

3 Answers

As @ndclt pointed out, you can't yet, but a workaround for the time being could be using the evaluate expression functionality.

Say you are interested in the hex representation of a, you can use the built-in function hex() to achieve this:

hex(a)

Putting this in the evaluate expression dialog would give you the hex representation string.

You can bring up that action using CTRL+F8 (Windows/Linux) or ALT+F8 (Mac).

Related