Ara Yeressian
Ara Yeressian

Reputation: 4045

How to copy watch expression value in eclipse?

How to copy watch expression value in eclipse? Whenever I use "Copy Expression" from drop down menu it gets me something like this '"System.currentTimeMillis()" (pending)'. Is the pending part should have been the value of system time?

Upvotes: 2

Views: 1491

Answers (2)

Mike
Mike

Reputation: 21

This worked for me:

Select the expression, right click and disable.
Then copy/paste as normal
Then right click and enable

Should get something like this (and you can just delete the disabled tag):

"System.currentTimeMillis()" value (disabled)

Upvotes: 2

Dave Berry
Dave Berry

Reputation: 11

Could not find a way to do this directly - but here's a workaround: Use

System.out.println(YourExpression.foo())

Then you can copy the output from the Console.

Upvotes: 0

Related Questions