Expressions Panel

The Expressions Panel is a panel in the top-level Main Window. The Expressions Panel allows the user to interactively evaluate simple expressions including method calls. See the General and also Expressions tabs in the Global Settings Dialog for Expression Panel options.

input

A simple expression can be typed in the lower text field followed by hitting the Enter key. The entered expression is displayed (in red) and the resulting type name and output is displayed (color-coded), in the upper text pane. If an error is encountered then the resulting error message is displayed (in red) in the upper text pane.

valid expressions

Valid expressions in the current scope are:
  1. Local variable name
  2. Class (This) field name
  3. objectRef.fieldName (can be a private field)
  4. arrayRef[i] or arrayRef[2], or arrayRef.length
  5. fullPackageName.className.staticField
If the result of the expression is an object, then the corresponding object ID and class name will be displayed first. Then the corresponding object fields will be displayed, in the inheritance hierarchy.

If the result of the expression is an array, then the corresponding object ID, and array element type name and array length will be displayed first. Then the corresponding array elements will be displayed.

If the result of the expression is a String, then the corresponding String data will be displayed.

method calls

A single method call can also be invoked: Method arguments can be local variables or field names in the current scope, or values such as: null, true, this, 4, 5.2, "test", 'c'.

Note well that invoking the method call causes all threads in the target JVM to be resumed. The target JVM thread (the debug event thread) where the last debugger event occurred (such as hitting a breakpoint), will execute the method call. When the method call invocation completes, the target JVM will be suspended again. The debug event thread will be suspended once again, at the location it was previously suspended at, before the method call invocation. All other target threads may have advanced location.

context menu

A popup Context Menu can be displayed by right clicking on the upper text pane:

©2001-2010. debugtools.com LLC. All rights reserved.