Local Varibles and Fields

See Also

The Variables view shows local variables within the current debugging context (combination of current thread and stack frame). The fields of the current class ("this") are shown under a node called this in the display. This allows you to view any local variables that may have the same name as a field in the current class.

The Variables view, like other tree-structured views, will attempt to keep the expanded branches open while stepping through code. If, however, you have clicked on a column header in the view in order to sort the display, the tree will always collapse when it is updated. This is apparently a feature of the tree-table component in the NetBeans Platform.

Setting Watch Breakpoints

The view context menu provides an item that creates a special type of variable breakpoint. This breakpoint is set for a particular field in a specific instance of the enclosing class. When that field is changed the breakpoint will suspend the debuggee. You can change the attributes of the breakpoint via the Breakpoints view. Because this breakpoint is set to filter on a specific object instance, it will self-destruct when the session disconnects from the debuggee, as there is no way for it to connect with that object later.

See Also


Legal Notices