When using the JavaScript debug support function, JavaScript global variable values can be referenced and changed without coding a print instruction for debugging.
Note
The JavaScript debug support function cannot set breakpoints to interrupt JavaScript execution, and cannot reference or change variable values at the time of an interruption. If that type of debugger is required, use a third party browser-embedded debugger. The Internet Explorer Developer Tools can be used for Internet Explorer 8, 9 or 10. Refer to the Internet Explorer Help for details.
Procedures prior to initiating debugging
The procedures prior to initiating debugging using the JavaScript debug support function are as follows:
Deploying the debug support Web application
Deploy the debug support Web application stored in the following location to the IJServer Cluster:
<Java integrated development environment installation folder>\etc\jsdebug\f5drjsdbg.war
Launching the IJServer Cluster
Launch the application to be debugged and the IJServer Cluster to which the debug support Web application was deployed.
Accessing the debug target Web application from a Web browser via the debug support Web application
When accessing the debug support Web application, specify the URL of the debug target Web application in the URL parameter
Example) http://localhost/f5drjsdbg/?url=/(debug target context root)/index.html
Implementing the above displays the debug target application window and the debug support function window in the Web browser.
Note
The debug support function and the debug target application must be deployed on the same host.
The debug support function window is displayed as a popup window. If the browser settings are configured to block popup windows, the debug support function window may not be displayed. In this case, set the browser to allow popup windows from the site on which the debug target application is deployed.
Referencing variable values
Refer to the following and add variables to the variable list and reference variable values:
Variable name
Specify the name of the variable to be added to or deleted from the variable list. Multiple variable names can be specified, separated by commas or line feeds.
Variable list
Variable names, types, and values are displayed in the following format:
Variable name (variable type): Variable value
If a variable is an object, the "+" icon is shown before the variable name. When this icon is clicked, a hierarchical information display shows the property name, type, and value of the object.
Displaying the most recent values
The display of [Variable List] values is not updated automatically when the values are changed in an application. Click [Show Latest Values] to update the display. Locations with updated values are displayed in red.
Note
Only global variables can be displayed. Local variables defined in functions cannot be displayed.
Function type variable values cannot be referenced. Note that, if Internet Explorer is being used, "object" is displayed as the variable type even if the variable is a function type variable.
JavaScript variables are enabled in only the page in which they are defined. When the display is switched to another page, the variables defined in the previous page are disabled.
Variable value references and changes are possible only while the application window remains open. Once the window has been closed, the variable values can no longer be referenced or changed when the window is reopened.
Point
If an application window is split into frames, the variables defined in a page within a frame can be displayed by specifying "frame name.variable name" at [Variable Name].
Changing variable values
To change a variable value, click the variable value displayed in [Variable List]. This changes the area that shows the value to an input field. Enter the new value in the input field and press the [Enter] key to change the variable value. The changed location is displayed in green.
The value input method depends on the type of value to be entered, as shown below.
Value type | Input method |
---|---|
number | Enter a numeric value. |
boolean | Enter "true" or "false". |
string | Enter a character string enclosed in double quotation marks ("). |
undefined | Enter "undefined" to set the variable value as undefined. |
null | Enter "null" to set the variable value to null. |
object | The value of an object type variable cannot be changed. If an object has a numeric type, logical value type, or string type property, the value can be changed for that property. |
function | The value of a function type variable cannot be changed. |