Next Previous Up Top Contents Index

8 Running and Debugging CORBA Applications

8.1 Debugging client/server applications in the IDE

The following text is a quotation from the Functional Developer manual Getting Started with Functional Developer. See Chapter 6 of that manual for general information about running, debugging, and interacting with applications.

If you have a client/server application, where both the client application and server application are written in Dylan, you can debug them in parallel.
Start by opening both projects in the environment. It is not possible to run two instances of the environment, with one debugging the client and the other debugging the server: if any libraries are shared between the applications, both environment instances will attempt to lock the compiler database files for those libraries. Since all applications ultimately use the Dylan library, and most share other libraries -- not the least of which in this case being networking libraries -- using two Functional Developer processes is never a practical debugging method.
This is not a disadvantage. By running both client and server in one Functional Developer, you can be debugging in the client, and then when the client invokes the server you can smoothly start debugging that instead. This can be very useful for tracking down synchronization bugs.
Once you have both projects open, you can start both applications up. Note that by default the action of starting a project will switch the active project, so the last project you start will be the active one by default. You can change this behavior in the main window with Options > Environment Options... so that the active project does not switch in this situation. See "The active project" on page 111 [of Getting Started with Functional Developer] for more information.
If you need to rebuild a library shared between the client and server, you need to stop both running applications, since Windows forbids writing to a DLL that is currently in use.
Be careful when setting breakpoints if the client and server library share source files. If you set a breakpoint when editing a shared file, the breakpoint will be set in the editor's active project. You can change the active project using the popup in the main window.
Breakpoints set in other windows' source pages (such as in the browser) act on the project associated with the window. Note that this makes it possible to set breakpoints in both the client and the server so that the debugger correctly opens up on the appropriate project as the breakpoints are reached. However, you cannot set the same breakpoint in both projects at once. Instead you have to go into each project and set the breakpoint separately.

Developing Component Software with CORBA - 26 May 1999

Next Previous Up Top Contents Index