Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323962 - Cannot add detail formatter for byte[]
Summary: Cannot add detail formatter for byte[]
Status: CLOSED DUPLICATE of bug 187922
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 08:34 EDT by Juergen Weber CLA
Modified: 2014-05-12 13:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Weber CLA 2010-08-30 08:34:01 EDT
Build Identifier: 20100617-1415

I'd like to have a byte[] formatted like the output of Linux's hexdump -C
Unfortunately it looks like it is not possible to find primitive types in the "Select Type" dialog of "Add Detail Formatter"
It should be possible for primitive types and arrays of primitive types, too.

Reproducible: Always
Comment 1 Ivan CLA 2012-08-15 09:18:54 EDT
Want it too, not fixed in 20120614-1722.
Why doesn't Eclipse resolve e.g. "[B" class name and other primitives and arrays of classes/primitives?
While debugging it is often useful to see some buffer content as a String (or something else). Especially when you work with HTTP or other text related protocols.
Comment 2 Juergen Weber CLA 2014-05-07 05:27:02 EDT
Found a workaround:

write a static method
public static String hexdump(byte[] b)

and put this into a jar in jre/lib/endorsed of the VM Eclipse runs in.

Then you can use in Expressions View an expression like Hexdump.hexdump(myarry)
Comment 3 Michael Rennie CLA 2014-05-12 13:48:26 EDT

*** This bug has been marked as a duplicate of bug 187922 ***