2

i would like to read the information displayed in the "Variables" or "Watch" window when debugging.

is there any way to do that with out going into eclipse source code?

thanks.

3
  • Why wouldn't you want to go to the source code? What's the purpose of debugging if not for checking the code? Commented Jan 14, 2011 at 2:52
  • You are going to need to provide more information in your question if you expect a useful answer. In particular, what do you mean by "read". Who is supposed to be reading that information? To do what? Commented Jan 14, 2011 at 2:55
  • i would like to pront it out. i would like to have like a "daemon" program that runs in the background (as a plugin for eclipse) and each line of code that passes i would be able to analyze that data in the debugger... (stack trace, variable information and values. etc.) Commented Mar 30, 2011 at 8:09

2 Answers 2

5

As mentioned in "Tips and Tricks for Debugging in Eclipse", the variable view allows you to define exactly what you want to see from a given variable by writing your own formatter:

alt text

That way, an object don't just display its memory address, but its actual value (and only the one you have chosen to see at that):

alt text

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

6 Comments

as i said above. i would like to print this information out, automatically.
@Gleeb: sorry, I completely missed your other comment. The expression used in the formatter I mention should enable you to automatically display said information.
Thanks. i saw this abit late. but i will try it out. if this works i'll have some follow up questions. i'll link this post to the follow up question.
@Gleeb What was missing in the answer for you to remove the accepted status?
it was a long time since this question was posted and this answer wasn't correct even then. if you read the comments on the question itself, you will see that i was looking to create a plugin for eclipse or some sort of 3rd party application that will connect to the eclipse debugger and be able to read information from it. like i said top long time ago, i want for each line of code to read the debugger information (variables, stack trace ETC.), i still don't know how to do that but what your explaining here is how to work with the debugging perspective.
|
1

I agree with vonc answer above but you really wanted Watch equivalent in eclipse.

i.e "Expression" third tab from variable ...

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.