Project Properties - Debug Agent Options

Applies to TestComplete 15.47, last modified on January 20, 2023
Information in this topic applies to desktop applications only.

The Open Applications > Debug Agent properties specify Debug Info Agent™ settings for the project. The Agent exposes public, protected and private elements of applications created in Microsoft Visual C++, Borland Delphi, CodeGear Delphi, Embarcadero Delphi, Borland C++Builder, CodeGear C++Builder and Embarcadero C++Builder. In order to use the Agent with an application, this application must be compiled with debug information. For instructions on doing this in various development tools, see Implementing Debug Info Agent™ Support in Applications.

To view or modify the Debug Agent settings:

  • Open the Properties page of the project editor and then choose Open Applications > Debug Agent in the list on the left of the page.

TestComplete Project Properties - Debug Agent

Click the image to enlarge it.

You can change the following options:

  • Enable Debug Agent - Defines whether the Agent should be enabled for the current project. If the option is enabled, then the application compiled with external debugger information, would be accessed as a plain Open Application. Turning this option off is equivalent to specifying the /DisableDebugAgent key in the application’s command-line.
     

  • Advanced exception handling - Specifies how the Debug Agent should process exceptions that occur during the application’s function calls. If this option is enabled, the Debug Agent generates detailed information about these exceptions. You can use this information in the exception handling blocks. For more information on exception handling, see Handling Exceptions in Scripts. If this option is disabled, the Debug Agent does not generate any information on the exceptions.

    Note that you can change this option’s value from scripts by using the DebugAgent.AdvancedExceptionHandling property.
     

  • Combine class definitions from different modules - Some compilers can arrange the binary code of a class among several modules. For instance, this happens to some MFC controls. The debug information on each module will contain data about methods, properties and fields defined in that module only.

    If the setting is enabled (default), the Debug Agent analyzes debug information of different modules and combines fields, methods and properties of the classes, which have the same name, into one class. That is, despite the fact that methods, properties and fields are defined in different modules, the test engine “sees” them as members of the same class. This approach makes your tests less dependent on the way the class is implemented. You can work with an object of a class in the way, no matter whether you obtain this object from one module or another. For example, if a compiler arranged members of your class into an executable and a DLL, your tests will get access to all the class members regardless of the module in which the member is implemented.

    If the setting is disabled, the Debug Agent does not combine classes that have the same name, but are defined in different modules. In this case, the class members that will be available to your tests depend on the way you obtain objects of this class. For example, if you obtain an object from an executable, the test engine will “see” only the fields, methods and properties defined in that executable; and if you obtain an object from a DLL, the test engine will “see” only the fields, methods and properties that are in that DLL.

    There can be a situation when different modules contain different classes with the same name. If you need to work with these classes, you have to disable the setting. If you keep the setting enabled and obtain an object from one module and then call a method or property defined in another module, an error will occur.
     

  • Read debug information for statically linked libraries - Specifies whether the Agent reads debug information for the libraries that are linked to the tested application at load time.

    The libraries should include the debug information in order to use the Debug Agent, otherwise data is not read.

    The Debug Info Agent does not read debug information for dynamically linked modules.

    Reading and parsing debug information is a time consuming process. This setting let you skip reading debug info for third-party libraries, if you do not need to work with internal methods and properties that are defined in them. For instance, if you are testing a Visual C++ application that uses MFC shared libraries and your tests do not use MFC methods and properties defined in these libraries, you may disable the setting to skip reading debug information for these libraries. This will help the test engine obtain information on your application’s objects faster and will make our tests run faster.

    Note: It is recommended to enable this option when testing the following application types:
    • Delphi applications compiled with the Build with packages option enabled.

    • Visual C++ applications that use MFC classes and that are compiled with the Use MFC in a shared DLL option enabled.

  • Maximum string length of [out] parameters - Specifies the maximum length of a string that can be received by TestComplete from the tested application. If the length or the string returned from the application via one of its out parameters exceeds the property’s value, TestComplete treats the returned string as a null one.

The default values of the Debug Agent settings that are used in new TestComplete projects can be specified in the Default Project Properties - Debug Agent Options dialog.

See Also

Debug Info Agent
Default Project Properties - Debug Agent Options

Highlight search results