Compiling C++Builder 6 Applications With Debug Information

Applies to TestComplete 15.69, last modified on November 13, 2024

Debug Info Agent™ exposes public, published, protected and private members of objects in C++Builder applications as soon as the application is compiled with debug information. This topic explains how to include debug information into applications created with Borland C++Builder ver. 6. To learn how to prepare applications created with other C++Builder versions, see Implementing Debug Info Agent™ Support in Applications.

Note: Debug Info Agent™ is incompatible with tools that change the debug information format. An example of such a tool is EurekaLog 7. We recommend that you disable EurekaLog when compiling an application aimed for automated testing with TestComplete. Otherwise, you will be unable to access private, protected and public methods and properties of your C++Builder 6 applications from tests.

To include debug information into your C++Builder application, follow these steps:

  1. Open your project in Borland C++Builder.

  2. Choose Project | Options from the main menu to open the Project Options dialog.

  3. Select the Compiler tab and enable the Debug information option in the Debugging group:

  4. Switch to the Linker tab and enable the Create debug information and Use debug libraries options in the Linking group:

    Note: If you leave the Use debug libraries option unchecked, VCL object methods and properties will not be accessible to the Debug Info Agent™ and TestComplete will only able to work with user-defined methods and properties.
  5. Switch to the Directories/Conditionals tab and examine the Library path. If the path contains the $(BCB)\lib\release directory, replace it with $(BCB)\lib\debug:

  6. It is recommended that you turn off the Build with runtime packages option on the Packages tab:

    If this property is checked, C++Builder creates Borland package library (.bpl) files when compiling the application. TestComplete cannot access debug information in these files and some controls. If this property is unchecked, all information is included in a single executable and can be accessed by TestComplete. For more information about runtime packeges, see About Runtime Packages.

    If, for some reason, you cannot turn off the Build with runtime packages option, TestComplete may not be able to get access to the application's internal methods and properties. To resolve the problem, enable the Read debug information for statically linked libraries project option in TestComplete.
  7. To see the names of method parameters in the Object Browser panel, switch to the Pascal tab, turn off the Optimization option and enable the Local symbols option:

  8. Once you have completed the steps above, click OK to save the changes and close the Project Options dialog.

  9. Re-build the application.

Note: C++Builder debug information is stored in .tds files. Make sure that the generated .tds files reside in the same folders as the appropriate modules of the application under test, otherwise the Debug Info Agent™ will not be able to access application internals.

Before delivering your application, remember to compile it without debug info to reduce the application size.

To make TestComplete recognize TMS Software VCL controls in the tested C++Builder Open Application properly and obtain access to their properties and methods, we recommend that you re-compile the utilized TMS components with full debug information before including them in your C++Builder application. To learn how to prepare these components for C++Builder applications, see Preparing TMS Software VCL Components for C++Builder Applications.

See Also

Debug Info Agent™
Debug Info Agent™ Specifics
Testing C++Builder Applications
Compiling C++Builder 2006 Applications With Debug Information
Compiling C++Builder 2007 Applications With Debug Information
Compiling C++Builder 2009 Applications With Debug Information
Compiling C++Builder 2010 Applications With Debug Information
Compiling C++Builder XE Applications With Debug Information

Highlight search results