Most often, to look up the variables' values in the debugging mode, it is enough to resort to the Watch List and Locals possibilities. For more complex tasks, we can use the Evaluate window.
Create the following function:
function testEvaluate() { var pEx = Sys.Process("explorer"); Log.Message(""); }
and set the breakpoint on the second line of the function (set the cursor on this line and press F9).
To get acquainted with the possibilities of the Evaluate window, we will need to implement the following actions:
testEvaluate
function. Its execution will be stopped and TestComplete will switch to the debugging mode.pEx
into the Expression field and click on the Evaluate button. In the result, the Result field will get the current value of the pEx
variable ([Object]
) inputted."string value"
string (by all means, with the quotation marks!) into the New value field and press Enter.In the result, the string value line will show up in the Result field. Now, the pEx
variable contains a new value.
The Evaluate window extends wider possibilities of working with various expressions as compared to that of the Watch List list:
pEx
first contained the object, and then the line).Sys
element, but rather any other objects as well. For example, it is possible to enter the BuiltIn
value into the Expression field and look up all the properties and methods of the BuiltIn
object, which are extended by TestComplete.Also, from the Evaluate window, one can add a current expression to the Watch List list (with the help of Add Watch
) for further tracking.
3.140.196.244