Debug Mode

Applies to TestComplete 15.64, last modified on May 16, 2024
Information in this topic applies to generic desktop applications (.NET, WPF, Delphi and others).

When Debug run mode is selected, TestComplete acts as a debugger for the tested application. After it launches the application, it monitors events that occur during the application run and reports information on these events to the test log. The traced events include debug strings sent by the application to the debugger, exceptions, the load and unload of modules and many others (see List of Traced Events).

For each event, TestComplete posts a message with appropriate information to the test log. For instance, if an exception occurs in the application under test, TestComplete posts the exception information to the log along with the stack of function calls that led to the exception (the exception information is added as an error message to the Test log table and the call stack is visible in the Remarks pane when you select this error message).

For complete information on using the Debug mode, see Tracing Events and Exceptions With Debug Services.


  • The DbgServices plugin must be enabled in File | Install Extensions.

  • To enable the exception tracing, activate the Exceptions | Active option in the Debug Services category of project properties.

  • To enable the event tracing, activate the Events | Enable events option in the Debug Services category of project properties.

  • In order for TestComplete to be able to include function names and source line numbers in the call stack, the application under test must be compiled with debug information.

Activating Debug Mode

To activate the Debug mode for a tested application:

  • Select the application in the TestedApps editor.

  • In the Basic Parameters section, select Debug from the Run Mode combo box.

  • In the Run-Mode Parameters section, specify the command line and working folder for the application if needed. See Debug Mode Parameters.

  • Select File | Save from the main menu of TestComplete to save the changes.

From now on, when you launch the application from Project Explorer, from the TestedApps editor or tests using the Run TestedApp keyword test operation or the TestedApps.AppName.Run scripting method, TestComplete will launch the application in debug mode.

You can also activate the Debug mode and specify its parameters from your keyword tests and scripts. To learn how to do this, see Editing Desktop Application Parameters.

Debug Mode Options

You can view and change the tested application parameters, such as the application path and user account, in the TestedApps editor. For a detailed description of available parameters, see:

Debug Mode Parameters

The tracing functionality, in its turn, is controlled by two options located in the DbgServices Options dialog: Enable events and Priority. The Enable events setting turns event tracking on or off. Priority sets the priority attached to the messages posted to the test log of each application event. You can choose a priority level that will distinguish event messages from other messages.

You can also control the DbgServices options from tests through the DbgServices.Options property.

See Also

About Tested Applications
Tracing Events and Exceptions With Debug Services
Run Modes and Parameters
Debug Mode Parameters

Highlight search results