PHP Debugging: Variables Window

See Also

The Variables window lists the local variables in the current call. By default, the Variables window opens automatically whenever you start a debugging session. You can open the Variables window by choosing Window > Debugging > Variables.

If you open the Variables window when a debugging session is running, it closes automatically when you end the debugging session. If you open the window when no debugging session is running, it stays open until you close it.

The information given for each variable includes the variable name, type, and value. You can click the control to the left of the name to expand or collapse the variable. If the object type is displayed in blue underlined text, clicking the text jumps to the object type in the source code. You can click the Value cell to edit the value directly in the Variables window.

In some cases, the debugger assigns a pound sign (#) and a number as the variable's value. This number is a unique identifier of the given instance. You can use this identifier to determine if a variable points to the same or to a different instance. You cannot edit this value.

Icons

The following table describes the icons displayed to the left of the object name.

Icon Description
Local variable icon Local variable
Super variable icon Container for a superclass
Static field icon Static field of an object
Non-Static field icon Non-static field of an object
Return values history icon The return values of executed methods when using expression step.
Arguments to expression step icon Input values for next method when using expression step.

Actions

If you right-click inside the Variables window, the pop-up menu displays the following choices:

Menu Item Description
New Watch... (Outside of rows only) Opens a dialog where you enter the expression for a new watch
Filters Opens a dialog where you select which variable types to show.
Show only rows where... (In Value column only) Opens a dialog where you can set a filter on the Variables window. The filter shows only the variables whose values are related to the value of the selected variable according to the choice you make in the dialog (equal to, less than, more than, etc.). To remove a Show only rows where... filter, open the dialog again and select No filter.

Properties

By default, all properties are displayed directly in the Variables window, except for the toString() property. To display the toString() property in the Variables window, click the Change Column icon in the upper right corner of the window, or right-click in the window and choose List Options > Change Visible Columns and then select the toString() checkbox in the dialog box.

See Also
Current Context in the PHP Debugger
Viewing Variables When Debugging PHP Applications
Enabling and Creating Watches in PHP Code
Debugger Windows

Legal Notices