如何在调试时查看 SWT Image?
我在基于 SWT 的应用程序上添加了一个断点,当 Eclipse 在调试会话期间停止在该断点时,我想要查看 Image
变量引用的图像。
如果我右键单击该变量并选择监视或检查,我所看到的只是从Image
的toString方法。
是否可以?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
调试视图无法“显示”图像。自定义“详细信息格式化程序”只能返回要显示的字符串,而不是
Image
或ImageDescriptor
。不过,这将是一个非常好的扩展......The debug views cannot "show" an image. The custom "Detail Formatters" can only return a string to be shown, not an
Image
orImageDescriptor
. It would make for a very nice extension though...您可以添加几行代码将
Image
保存到光盘上,然后您就可以查看该图像了。You could add a few lines of code that save the
Image
to your disc, then you can view the image.