6

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?

1 Answer 1

11

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.