jtulach commented on code in PR #9732:
URL: https://github.com/apache/netbeans/pull/9732#discussion_r4374515039
##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/BreakpointOutput.java:
##########
@@ -375,13 +376,45 @@ private void printOutEvent(DebuggerConsoleIO io, String
format, JPDABreakpointEv
printText = selectCondition(printText, threadStartedCondition,
false);
}
}
+
+ int printLocals = printText.indexOf(localsPattern);
+ if (printLocals != -1) {
+ printText = printText.substring(0, printLocals) +
printText.substring(printLocals + localsPattern.length());
+ }
// 5) resolve all expressions {=expression}
printExpressions(event, printText, (msg, action) -> {
io.printWithAction(msg, action, false);
}, (msg) -> {
io.println(msg, null);
});
+
+ if (printLocals != -1) {
+ CallStackFrame csf = findTopFrame(event);
+ if (csf != null) {
+ try {
+ for (var refValue : csf.getLocalVariables()) {
+ io.printWithAction(" ", null, false);
+ io.printWithAction(refValue.getName(), null, false);
+ io.printWithAction(" = ", null, false);
+ if (refValue instanceof ObjectVariable obj &&
!isNull(obj)) {
+ var sessionRef = new WeakReference<>(session);
+ io.printWithAction(obj.getValue(), () -> {
Review Comment:
The e644433 test is fixed by `Variable.toFixed()` introduced in 4db2f0a6d7
--
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