在eclipse中调试调用类实例方法 [英] Call class instance method while debugging in eclipse

查看:134
本文介绍了在eclipse中调试调用类实例方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



例如让我说我有以下代码:

  ... 
Canvas canvas = m_SurfaceHolder.lockCanvas();
canvas.drawColor(0xff000000);
...

我在canvas.drawColor行上有一个断点。当我调试时,代码停止在那行,我可以查看画布中的变量,但我也想能够调用画布中的方法,看看他们返回像我可以在visual studio,这是可能吗? p>

解决方案

打开显示视图,键入要在其中执行的代码,选择它,单击,然后单击<执行,显示检查,具体取决于您要执行的操作。 b $ b

How do I call a class instance method while debugging in eclipse?

For example lets say I have the following code:

...
Canvas canvas = m_SurfaceHolder.lockCanvas();
canvas.drawColor(0xff000000);
...

And I have a breakpoint on the line canvas.drawColor. When I debug, the code stops at that line and I can view the variables inside canvas, but I also want to be able to call the methods inside canvas to see what they return like I can in visual studio, is this possible?

解决方案

Open the Display view, type the code you want to execute in it, select it, right-click, and click "Execute", "Display" or "Inspect", depending on what you want to do.

这篇关于在eclipse中调试调用类实例方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆