“Android Studio” debugging - display variables as

2019-01-20 07:38发布

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

2条回答
走好不送
2楼-- · 2019-01-20 08:07

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.

查看更多
来,给爷笑一个
3楼-- · 2019-01-20 08:33

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

enter image description here

Display all values as hex by default

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

enter image description here

(Note: these images are from Android Studio 1.2)

查看更多
登录 后发表回答