1

I added a breakpoint on my SWT-based application, and when Eclipse stops at it during a debug session I want to view the image referenced by an Image variable.

If I right click the variable and choose watch or inspect, all I see is what is returned from Image's toString method.

Is it possible?

Mario Marinato
  • 4,561
  • 3
  • 29
  • 49

2 Answers2

1

The debug views cannot "show" an image. The custom "Detail Formatters" can only return a string to be shown, not an Image or ImageDescriptor. It would make for a very nice extension though...

Tonny Madsen
  • 12,628
  • 4
  • 31
  • 70
  • Don't you know if there's a plugin for that? – Mario Marinato Jul 13 '11 at 18:32
  • 1
    None that I know of... I'm not even sure how to do it... You probably want to add a new item to the popup menu of the Variables view. The selection seems to be an `JDILocalVariable`... but I haven't tried to decipher this... – Tonny Madsen Jul 13 '11 at 22:39
1

You could add a few lines of code that save the Image to your disc, then you can view the image.

Kai
  • 38,985
  • 14
  • 88
  • 103