【问题标题】:How do I display a char array as an array of hex bytes or unsigned decimal numbers in the Eclipse Java debugger?如何在 Eclipse Java 调试器中将 char 数组显示为十六进制字节数组或无符号十进制数?
【发布时间】:2011-03-19 14:46:59
【问题描述】:

这与“How do I display a byte array as an array of hex bytes or unsigned decimal numbers in the Eclipse Java debugger?”完全相同,
除了它适用于char[] 而不是byte[]

那么,我如何在 Eclipse Java 调试器中将 char 数组视为十六进制字节(每个 2 位)或无符号十进制数的数组?

【问题讨论】:

    标签: java eclipse types debugging


    【解决方案1】:

    更一般地说,(请参阅Tips and Tricks for Debugging in Eclipse),您可以编辑并制作自己的格式化程序以用于任何类型的值:

    (在 Java->Debug->Detail Formatters 下的 Eclipse 首选项中)。

    这将改变,例如,这个:

    进入这个:

    然后,您可以将此技术用于您的 char[],前提是您首先设置了“作为所有变量的标签”选项

    【讨论】:

      猜你喜欢
      • 2011-04-25
      • 2020-01-24
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 2018-05-17
      • 1970-01-01
      • 2019-05-03
      • 2011-08-10
      相关资源
      最近更新 更多