views:

80

answers:

1

I have been trying to add to the Watch window a Java Date object (java.util.Date). Sometimes, when i hover over a Date in the source editor view, it shows the Date value in a readable format (e.g. 2009 Oct 26 14...) but sometimes, it just does not show the Date value but it only shows the declaration of the date variable/identifier. So as an alternative so that I could see the Date value, I tried adding it to the watch.

What I see in the Watch is something like this (for example the Date identifier is nowTime)

- x+y? "nowTime" = Date (id=136)
   +- cdate= Gregorian$Date (id=139)
   |- fastTime = 1256604393000

I am thinking that I could extra code by setting the Date as Calendar value and getting the component of the Calendar. But this requires code change just to Debug. This codes are sometimes not deleted and makes the code messy. Is there any other way to fix this? Or are there other watch expression that I could use without adding helper debug codes? Is there any

+2  A: 

You could edit the watch to nowTime.toString() to get readable information

fvu
oh my. why did i miss that. sometimes the correct answer is the simplest. Thanks.
Nassign