Debug Info Agent™ exposes 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 Embarcadero C++Builder XE2 – XE8, C++Builder 10 Seattle, C++Builder 10.1 Berlin, and C++Builder 10.2 Tokyo. To learn how to prepare applications created with other C++Builder versions, see Implementing Debug Info Agent™ Support in Applications.
Notes:
- Debug Info Agent™ currently does not support exposing private, protected and public members of objects in 64-bit C++Builder applications. Only published members can be exposed.
- 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 XE2 – XE8 applications from tests.
To include debug information into your C++Builder application, follow these steps:
-
Open your project in Embarcadero C++Builder.
-
Choose Project | Options from the main menu to open the Project Options dialog.
-
Select the C++ Compiler | Optimizations category and set the Disable all optimizations option to true:
-
Switch to the C++ Linker category and set the Full debug information option to true:
-
Switch to the C++ (Shared Options) category and examine the Library path. Make sure that the path includes the $(BDS)\lib\$(PLATFORM)\debug folder:
-
It is recommended that you turn off the Link with runtime packages option in the Packages | Runtime Packages category:
If this property is checked, Embarcadero 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. -
Once you have completed these steps, click OK to save the changes and close the Project Options dialog.
-
Re-build the application.
Note: | Debug information generated by the 32-bit C++Builder compiler 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 information in order to reduce the application size.
By default, Developer Express VCL components for C++Builder are compiled and distributed without debug information. Therefore, TestComplete cannot obtain access to properties and methods of such VCL controls used in the tested C++Builder Open Application. However, you can re-compile Developer Express VCL components for C++Builder with debug information and then use them in C++Builder Open Applications tested by TestComplete. To learn how to prepare these components for C++Builder applications, see Preparing Developer Express VCL Components for C++Builder Applications. 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