如何在Eclipse Java调试器中将字节数组显示为十六进制字节数组或无符号十进制数字? [英] How do I display a byte array as an array of hex bytes or unsigned decimal numbers in the Eclipse Java debugger?

查看:279
本文介绍了如何在Eclipse Java调试器中将字节数组显示为十六进制字节数组或无符号十进制数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Eclipse中查看一个字节数组(Helios Release,build id:20100617-1415)Java调试器作为十六进制字节数组(每个2位数字)或无符号十进制数字?那可能吗?如何?



例如,我想显示:





... as:0,48,71,22,139,166 ,...



...或作为:0x00,0x30,0x47,0x16,0x8B,0xA6,...



(这是一个类似的问题,如何在Eclipse Java调试器中将字节数组显示为char数组?。)

解决方案

不完全符合您的要求,但正如我在DEBUG MODE中所知道的,原始类型(int,long,...)有一个选项。


切换到调试透视图

 在变量视图中,单击
菜单项(三角形项在
最小化之前)并选择Java Primitives ...。

 在对话框中,您可以选择Hex
视图,Ascii视图和无符号(对于
字节)。


发现这个,或许有帮助:内存视图



在3.7(或许更早),进入首选项,在过滤区域中键入原始显示,然后选择显示十六进制值。


I want to view a byte array in the Eclipse (Helios Release, build id: 20100617-1415) Java debugger as an array of hex bytes (2 digits each) or unsigned decimal numbers? Is that possible? How?

For example, I want to display this:

...as: 0, 48, 71, 22, 139, 166, ...

...or as: 0x00, 0x30, 0x47, 0x16, 0x8B, 0xA6, ...

(This is a similar question to "How do I display a byte array as a char array in the Eclipse Java debugger?".)

解决方案

Not exact what you want but as I know in DEBUG MODE, there is an option for primitive Types (int, long,...).

 Switch to Debug perspective.
 In the Variables view click the "menu" item (triangle item before minimize) and select "Java Primitives...".
 In the Dialog you can choose between Hex view, Ascii view and unsigned (for byte).

Found this, maybe help: Inside the Memory View

On 3.7 (and maybe earlier), go into preferences, type "primitive display" in the filtering area, and choose to display hex values.

这篇关于如何在Eclipse Java调试器中将字节数组显示为十六进制字节数组或无符号十进制数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆