Home
Using the Display view
To evaluate an expression in the context of the currently suspended thread which does not come from the source code, use the Display view.
![]()
Set a new breakpoint on the line: transaction.setAccount(this);
![]()
Click Step Return until you reach that line.
![]()
From the Workbench, select Windows Æ Show View Æ Display.
![]()
Type the expression transaction.getTransTime() in the Display View, then highlight the expression, right-click, and select Display (Figure | 4-11).
![]()
Figure 24-11 Expression and evaluated result in display view
Tip: When entering an expression in the Display Panel, it is possible to use code assist (Ctrl+Space).
![]()
Each expression is executed, and the result is displayed as shown in Figure | 4-11. This is a useful way to evaluate Java expressions or even call other methods during debugging, without having to make changes in your code and recompile.
![]()
You can also highlight any expression in the source code, right-click, and select Watch (or Inspect). The result is shown in the Expressions view.
![]()
Select Remove from the context menu to remove expressions or variables from the Expressions views. In the Display view, just select the text and delete it.
ibm.com/redbooks