Testing and Debugging the Application

From RAD Studio
Jump to: navigation, search

Go Up to Creating Simple COM Servers Index

Once you have created a COM server application, you will want to test it before you deploy it.

To test and debug your COM server application,

  1. Turn on debugging information using the Compiler page on the Project > Options dialog box, if necessary. Also, turn on Integrated Debugging in the Tools > Options > Debugger Options dialog.
  2. For an in-process server, choose Run > Parameters, type the name of the Automation controller in the Host Application box, and choose OK.
  3. Choose Run > Run.
  4. Set breakpoints in the Automation server.
  5. Use the Automation controller to interact with the Automation server.

The Automation server pauses when the breakpoints are reached.

Note: As an alternate approach, if you are also writing the Automation controller, you can debug into an in-process server by enabling COM cross-process support. Use the Embarcadero Debuggers page of the Tools > Options > Debugger Options dialog to enable cross-process support.