Java Data Type Renderer - byte array as image

I've read every post about type renderers, and there seems to be a dirth of substantive responses. The help documentation is typically light on examples.

I want to be able to view a byte array as an image in the debugger. In VisualStudio this would be done with a custom visualizer - and I thought in IntelliJ it would be supported via a Type Renderer. However, I haven't been able to make it work.

I see two major hurdles:

  1. How to declare the proper data type? When selecting this in the Debugger Type Renderer dialog, it won't accept "java.long.Byte[]" - presumably because there's no array size.
  2. Once I've got the type set properly (whatever that ends up looking like), how to then display it in the debugger?


The reason this is important is that when the inspected code turns the byte array under review into an image, and I use the debugger to "Show Image" the image flashes on the monitor and immediately disappears - leading me to believe there's something wrong with it that is hidden from me by the debugger failing silently.

1 comment
Comment actions Permalink

Okay, turns out I can see the image if I manage to click on it before it disappears.

0

Please sign in to leave a comment.