4D v16.3Watch Pane |
||||||||||||||||||||
|
4D v16.3
Watch Pane
Watch Pane
The Watch pane is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. Here is an example: The Watch Pane displays useful general information about the system, the 4D environment, and the execution environment. The Expression column displays the names of the objects or expressions. The Value column displays the current value of corresponding the object or expression. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. The multi-level hierarchical lists are organized by theme at the main level. The themes are:
Depending on the theme, each item may have one or several sublevels. Clicking the list node next to a theme name expands or collapses the theme. If the theme is expanded, the items in that theme are visible. If the theme has several levels of information, click the list node next to each item for exploring all the information provided by the theme. At any point, you can drag and drop themes, theme sublists (if any), and theme items to the Custom Watch Pane. This theme displays the values of the objects or expressions that are:
Since the previous line of code is the one that was just executed before, the Line Objects theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: TRACE 1. You enter the Debugger window with the Source Code Pane program counter set to the line a:=1. At this point the Line Objects theme displays:
The a variable is shown because it is used in the line to be executed (but has not yet been initialized). 2. You step one line. The program counter is now set to the line b:=a+1. At this point, the Line Objects theme displays:
The a variable is shown because it is used in the line that was just executed and was assigned the numeric value 1. It is also shown because it is used in the line to be executed as the expression to be assigned to the variable b. The b variable is shown because it is used in the line to be executed (but has not yet been initialized). 3. Again, you step one line. The program counter is now set to the line c:=a+b. At this point the Line Objects theme displays:
The c variable is shown because it is used in the line to be executed (but has not yet been initialized). The a and b variables are shown because there were used in the previous line and are used in the line to be executed. And so on... The Line Objects theme is a very convenient tool—each time you execute a line, you do not need to enter an expression in the Custom Watch Pane, just watch the values displayed by the Line Objects theme. This theme is composed of the following subthemes:
Note: You can modify String, Text, Numeric, Date, and Time variables; in other words, you can modify the variables whose value can be entered with the keyboard. Arrays, like other variables, appear in the Interprocess, Process, and Locals subthemes, depending on their scope. The debugger displays each array with an additional hierarchical level; this enables you to obtain or change the values of the array elements, if any. The debugger displays the first 100 elements, including the element zero. The Value column displays the size of the array in regard to its name. After you have deployed the array, the first sub-item displays the current selected element number, then the element zero, then the other elements (up to 100). You can modify String, Text, Numeric, and Date arrays. You can modify the selected element number, the element zero, and the other elements (up to 100). You cannot modify the size of the array. Reminder: At any time, you can drag and drop an item from the Watch Pane to the Custom Watch Pane, including an individual array element. This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: Some objects, such as list box arrays, can be presented as two distinct objects (the variable of the object itself and its data source). This list is particularly useful when your forms use dynamic variables intensively: it is easy to identify dynamic variables through the form object names. You can display the internal name of dynamic variables by selecting Show Types in the context menu: Dynamic variable names are of the "$form.4B9.42" form: This theme displays predefined constants provided by 4D. like the Constants page of the Explorer window. The expressions from this theme cannot be modified. This theme lists the tables and fields in the database; it does not list subfields. For each Table item, the Value column displays the size of the current selection for the current process as well as (if the Table item is expanded) the number of locked records. For each Field item, the Value column displays the value of the field (except picture, subtable, and BLOB) for the current record, if any. In this theme, the field values can be modified (there is no undo), but the table information cannot. This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. This list may be empty if you do not use semaphores. The expressions from this theme cannot be modified. Global semaphores are not displayed. This theme lists the sets defined in the current process (the one you're currently tracing); it also lists the interprocess sets. For each set, the Value column displays the number of records and the table name. This list may be empty if you do not use sets. The expressions from this theme cannot be modified. This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. This theme lists the process named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. This list may be empty if you do not use named selections. The expressions from this theme cannot be modified. This theme displays general information concerning database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. This information allows you to examine database functioning. This theme displays information concerning the Web server of the application (only available if the Web server is active):
The expressions contained within this theme cannot be modified. Additional options are provided by the context menu of the Watch pane. To display this menu:
The context menu of the Watch pane is shown here:
The following is a view of the Watch Pane with all options selected:
See also
Call Chain Pane
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||