Reputation: 161
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?
Upvotes: 5
Views: 2535
Reputation: 8550
This feature (for PyCharm) is implemented and is going to be included in 2019.3 release. Ticket https://youtrack.jetbrains.com/issue/PY-8118
Update 2019.3.4
Upvotes: 6
Reputation: 8587
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).
Upvotes: 2
Reputation: 3168
Yet, you can't. There is an open issue also concerning Pycharm if you want to follow this feature.
Upvotes: 1