DebugAgent Object

Applies to TestComplete 15.20, last modified on January 19, 2022

Description

DebugAgent is a helper object that is used to access specific properties of the tested application’s objects.

Members

Example

The code below demonstrates how you can use the TreatPCharAsVType method to specify the type of the values used by TestComplete to treat pointer-to-string parameters in a certain way.

JavaScript, JScript

function TreatPCharAsVType()
{
  DebugAgent.TreatPCharAsVType(varInteger);
  // All the pointer-to-string parameters are treated as integer values
  // ...
  DebugAgent.TreatPCharAsVType(varBoolean);
  // All the pointer-to-string parameters are treated as boolean values
  // ...
  DebugAgent.TreatPCharAsVType(varOleStr);
  // All the pointer-to-string parameters are treated as strings
  // ...
}

Python

def TreatPCharAsVType():
  DebugAgent.TreatPCharAsVType(varInteger)
  # All the pointer-to-string parameters are treated as integer values
  # ...
  DebugAgent.TreatPCharAsVType(varBoolean)
  # All the pointer-to-string parameters are treated as boolean values
  # ...
  DebugAgent.TreatPCharAsVType(varOleStr)
  # All the pointer-to-string parameters are treated as strings
  # ...

VBScript

Sub TreatPCharAsVType
  DebugAgent.TreatPCharAsVType(varInteger)
  ' All the pointer-to-string parameters are treated as integer values
  ' ...
  DebugAgent.TreatPCharAsVType(varBoolean)
  ' All the pointer-to-string parameters are treated as boolean values
  ' ...
  DebugAgent.TreatPCharAsVType(varOleStr)
  ' All the pointer-to-string parameters are treated as strings
  ' ...
End Sub

DelphiScript

function TreatPCharAsVType;
begin

  DebugAgent.TreatPCharAsVType(varInteger);
  // All the pointer-to-string parameters are treated as integer values
  // ...
  DebugAgent.TreatPCharAsVType(varBoolean);
  // All the pointer-to-string parameters are treated as boolean values
  // ...
  DebugAgent.TreatPCharAsVType(varOleStr);
  // All the pointer-to-string parameters are treated as strings
  // ...

end;

C++Script, C#Script

function TreatPCharAsVType()
{
  DebugAgent["TreatPCharAsVType"]( varInteger );
  // All the pointer-to-string parameters are treated as integer values
  // ...
  DebugAgent["TreatPCharAsVType"]( varBoolean );
  // All the pointer-to-string parameters are treated as boolean values
  // ...
  DebugAgent["TreatPCharAsVType"]( varOleStr );
  // All the pointer-to-string parameters are treated as strings
  // ...
}

See Also

About Open Applications
Debug Info Agent
TestComplete Helper Objects

Highlight search results