“Android Studio” debugging - display variables as

2019-01-20 08:16发布

问题:

I've recently moved from Eclipse to Android Studio, and it looks great. However, I can't seem to find how to display variables in debugging mode as hexadecimal values instead of decimal values. Any help would be appreciated. Thanks

回答1:

I was wondering the same thing, especially how to do this by default as @adnako asked. I finally found an answer so I will post here, too.

Manually change a single value

Right click > View as... > Hex

Display all values as hex by default

Right click > Custimize Data Views... > Show hex values for primitives > Apply

(Note: these images are from Android Studio 1.2)



回答2:

In the debug window, right click on the value you would like to view in hex and choose View as -> Hex. This can be done in the Variables or Watches views.