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.
Profiler 070221 Displaying result of toString() method invocation for objects in Fields table of heap walker could be really useful. While it could be problematic and non-informative for some objects it is still very useful for basic objects such as String, Integer, etc.
You have only heap dump - no method invocation is possible.
For some basic objects such as String, Integer, etc. you don't need to perform toString() method invocation to get its result. Even implementation of this feature for String object only could significantly improve usability of heapwalker. For example, YourKit profiler does have this functionality.
Yes, it is possible and we already thought about it, _BUT_ this is something completely different from your original description. Last but not least, it an ENHANCEMENT not DEFECT.
It was not set to ENHANCEMENT by mistake. Thanks for catching it. Would you like if I file one more ENHANCEMENT issue to track this? BTW, this issue was originally about Strings, and, probably, some more objects.
Reopened as an ENHANCEMENT for Strings.
*** Issue 103380 has been marked as a duplicate of this issue. ***
From issue 103380: It will be nice if as many chars from the value of the String as will fit in the column sould be shown with a ... which brings up a dialog with a text area that shows the full value of the String. This text area should allow copying of the text. Without this one has to expand the node which shows children as on char per row and is hard to read. Also copy paste of the value is not possible.
Target milestone cleanup.
Milestone cleanup: future->next
*** Bug 186659 has been marked as a duplicate of this bug. ***
Bug #186659 implements this for String.
Any objections to my applying the patch from bug #186659 in trunk? Would be useful, and seems pretty straightforward.
(In reply to comment #12) > Any objections to my applying the patch from bug #186659 in trunk? Would be > useful, and seems pretty straightforward. I would like to solve it in more general way. There are number of other classes, which can have meaningful string representation.
In a general way, or just for more common types (primitive wrappers, URL, URI, File, StringBuffer/Builder, ...)? The only general solution I can think of would be to look for bytecode of the impl class and try to run its toString method (if any) using a stack-based interpreter. You could limit its features strictly - method calls, field access, object/array construction in a temporary allocation buffer, branches, basic arithmetic ops, and a few other things - but it would still be a fair amount to work unless you used a third-party JVM-in-Java impl such as MJVM. Alternately, you could try to construct a live mirror of the object and its transitive dependencies in the current JVM, using a ClassLoader offering no permissions, and try to run its toString reflectively. Less safe, and the duplication of data would mean greater heap consumption.
*** Bug 167924 has been marked as a duplicate of this bug. ***
Already implemented.