This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 21782 - toString display of Watches/Variables/Debugger Tooltips
Summary: toString display of Watches/Variables/Debugger Tooltips
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker with 4 votes (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-21 18:37 UTC by klosels
Modified: 2010-04-29 09:09 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description klosels 2002-03-21 18:37:01 UTC
There's one thing I'd really like to see in the debugger: it would 
be very convenient to have the option to display watches (all or 
selected ones) and variables (all) in a "toString"-fashion rather than 
as object. 
The reason is that in many cases I only see MyClass#1234, 
member variables aren't directly readable as well but, you need to
open the node to show members which still might not be human readable.
But there may be a toString method which would show the important things. 
In this case I always have to create a watch and add ".toString()" to the 
definition.
Same applies to the Tooltips shown when hovering over a variable in
the editor window.
Comment 1 klosels 2002-03-21 18:42:17 UTC
A note on my experiences with watches, which might be helpful
when designing the implementation of this enhancement: when I
create watches with ".toString()" on objects whose toString-Methods
call synchronized methods, I sometimes end up with the debugger stopping
in Object.wait(). I don't know if there's any way to avoid this
but maybe somebody else does?
Comment 2 Marek Grummich 2002-07-22 09:14:23 UTC
Target milestone was changed from '3.4' to TBD.
Comment 3 Marek Grummich 2002-07-22 09:18:18 UTC
Target milestone was changed from '3.4' to TBD.
Comment 4 _ jrichard 2003-12-17 01:56:36 UTC
I'm not sure of the technical issues here, but I suppose stack
overflow (from unchecked recursion) and performance might be an issue
with calling obj.toString() for all objects in the debugger windows.

A suggestion was made in nbusers that the debugger windows have a
seperate column called "String Value" which shows toString().  This
could be disabled by the user by unchecking it for performance reasons.

A workaround is to mouse hover over an variable in the editor (be sure
the editor has focus) and the toString for that variable will be shown
in the tooltip.  (I donno what performance or recursion checking has
been done with the editor debugger tooltip.)
Comment 5 kovica 2003-12-17 06:54:30 UTC
Well, if you thing calling toString() would impact performance too
much, then I suggest implementing the Display feature that you can
find in Ecplise, where you select (or write) a piece of code in a
special window and then this piece of code gets evaluated in the
current debugger context.
Comment 6 kovica 2004-04-08 09:51:35 UTC
I would like this String value column very much since I do a lot with
BigDecimal's stored in HashMap and is quite difficunt to see what
exact values are stored in a HashMap.
Comment 7 dmartin01 2004-11-05 00:11:59 UTC
There is an optional collumn in the debugger 4.0 for toString().  I 
beleive it's off by default, but it is available.

Closing - hope you don't mind.
Comment 8 randahl 2004-11-05 08:19:53 UTC
That is great news! - Thanks!!!

Randahl
Comment 9 Quality Engineering 2010-04-29 09:09:52 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.