Debugging Clients and Services

corba facilities

The OrbRiver debugger allows you to verify the contents of the messages exchanged between clients and services. The facilities offered are the following:


The debugger is implemented as a Corba service controlled by a Corba client. The orbriver daemon has a special knowledge of this service so that it can dispatch to it any message if it is required to do so. The debugger client is the user interface to the debug service.

Setting clients or services for debug

A special routine is added to allow or disallow client and services to be debugged:

    procedure Corba.Orb.Set_Debug ( Self       : in Corba.Orb.Object ;
                                    Debug_Name : in Corba.String ;
                                    Debuggable : in Boolean);

This routine has two purposes:

This routine can be called at any time. However, it is recommanded to call it only once:

If a client or service is started with the command line parameter -DebugName &ls;name>, then it also becomes debuggable, unless an explicit call to Corba.Orb.Set_Debug after Corba.Orb.Orb_Init disables this feature.

A message is displayed by the debugger if the source OR the destination is debuggable and debugged. Only debuggable programs can be debugged.

The debugger will only be able to display the operations or attributes if and only if their IDL is stored in the Interface Repository (use ir_editor to do so).

If a client is debuggable, then all the requests it sends go through the orbriver daemon and direct connections to services are avoided. For performance reasons, it is wise to use the -DebugName option only when you want to debug a client.

Starting the debugger

In a shell window, run the debugger client '$ORBRIVER_DIR/bin/debugger' as any other OrbRiver client, telling it wich orbriver daemon you want to use. It displays the existing debugger services. By using the command "setd", a debugger service can be automatically started or an existing one can be used. The debugger service displays its output in a newly created window. You can have several debuggers running in parallel. When it is launched automatically, the debugger displays on the same machine as the orbriver daemon, it may not be the same display as the user.

You can launch your own debugger service by using "start_debugger" in the bin directory. You need then to give it a name using the command line option "-Name" and to indicate which orbriver daemon to use.

A debugger intialisation example

For this example, $ORBRIVER_DIR/bin is supposed to be in the PATH.
First, load the IDL used by the client or service you want to debug:

ir_editor -ORBName orbada_1
> ld -I../Idl ../Idl/my_service.idl
> quit

Start your own debug service:

start_debugger -Name BM_Debugger -ORBName orbada_1

A new window then appears, which is the debugger service display.

Start the debugger controller, attached it to the debugger service and configure your clients or services for debug:

debugger -ORBName orbada_1
The following debuggers are declared
> setd BM_Debugger
> set my_client expanded

In another window, run your client or service:

my_client.exe -DebugName my_client -ORBName orbada_1

Then all the requests and replies sent or received by this client are displayed in the debugger service window.

Using the debugger

The debugger commands are the following:

Commands are not case sensitive.


Usage: quit

The debugger client exits, asking if you also want to stop the controlled debugger service.


Usage: setd <debugger service name>

The given debugger service becomes under control. If it does not exist or is not running, you are asked if you want to start it automatically.


Usage: List

This command displays the list of connected clients and services with their name, host and command line.


Usage: Debuggees

This command displays the list of currently debugged clients and services with their name, host and command line.


Usage: Set_Debug <debuggable name> <debugging kind>

This command sets the debugging kind for the client or service having the given name:


Usage: Set_Log <log file name>

This command sets the name of the file where debug info is to be stored.
If no name is given, one is requested.
If the name is 'no_log' (default), debug info is displayed on the screen in the OrbRiver Debug Service window else it is stored in the file with the given file name.


Usage: help [command]

With no parameter, the list of commands is displayed.
With a parameter, the given command is described.


Usage: Quote [<character>]

With no parameter, this command displays the current quoting character.
The given character will be used as the quoting character inside names in order to allow the use of special characters inside names.

Inside a name, the following characters must be quoted:
The default quote is '`'.


Usage: Cancel [<character>]

With no parameter, this command displays the current cancel character.
The given character will be used to cancel a command.
The default cancel character is '?'.

Email Micro Focus support

Copyright Micro Focus 2002-2014. All rights reserved.