jtulach commented on code in PR #9691:
URL: https://github.com/apache/netbeans/pull/9691#discussion_r4232110305


##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/BreakpointOutput.java:
##########
@@ -397,43 +385,43 @@ private String substitute (String printText, 
JPDABreakpointEvent event) {
                         }
                     } catch (AbsentInformationException aiex) {}
                 }
-                try {
-                value = ((Variable) 
theDebugger.getClass().getMethod("evaluate", String.class, 
CallStackFrame.class).
-                        invoke(theDebugger, expression, csf)).getValue();
-                } catch (InvocationTargetException itex) {
-                    if (itex.getTargetException() instanceof 
InvalidExpressionException) {
-                        throw (InvalidExpressionException) 
itex.getTargetException();
-                    }
-                } catch (Exception ex) {
-                    Exceptions.printStackTrace(ex);
+                Variable refValue = theDebugger.evaluate(expression, csf);
+                if (refValue instanceof ObjectVariable obj) {
+                    io.printWithAction("  " + obj.getType() + " " + expression 
+ " = ", null, false);
+                    io.printWithAction("#" + obj.getUniqueID(), () -> {
+                        var ok = 
BreakpointOutputDetails.showObjectVariable(debugger, obj);

Review Comment:
   ### Hyperlink to Instances View
   
   <img width="1634" height="909" alt="HyperlinkToInstances" 
src="https://github.com/user-attachments/assets/db99b852-eacb-41e5-83fe-ebb02e07fcff";
 />
   
   - this is the vision I wanted to achieve 
   - when "log points" are used that evaluate and print variables
   - let's make the object variables a hyperlink that takes user to instances 
view



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to