Debugging CORBA Programs
You can use the IDE's debugger with your CORBA client and server programs.
There are a few things you must consider:
-
You must debug client and server programs separately. You cannot start
the debugger on the client side and trace the remote method call into
the server. Start the debugger on the server side and then run the
client. The debugger will show the server executing in response to the
request.
-
You cannot use the IDE's debugger for processes that are started
outside the IDE. In particular, you cannot debug CORBA server
processes that are started from an implementation repository.
-
If you want to debug a server-side program that is already running,
you need to unbind the program from the naming service before
restarting it. (If you do not, you will get an exception when the
binding code executes.)
-
If you have the naming service attached in the Naming Service browser
(on the Runtime tab of Explorer), right-click on the node for the
server and choose Unbind.
-
If the naming service is not attached, you must kill and restart the
tnameserv process by using shell utilities (ps and
kill) or by using your operating system's task manager.
Restart the naming service using the same arguments as before (tnameserv
-ORBInitialPort 1050).
-
If you want to debug only the client side, you do not need to restart
the naming service and rebind the implementation instance.
Setting Breakpoints
Use the standard IDE procedures for setting breakpoints. For example, to
set a breakpoint in the Hello World example's implementation class:
-
Go to the HelloImpl class in the editor and locate the line
containing the for() loop in the code.
-
Put the insertion point in this line, and press Ctrl-F8 to set a breakpoint
on this line.
-
Select the HelloServer class in the Explorer, and press F5 to
start the server in the debugger.
Execute the client as you did before. Server-side execution pauses
at your breakpoint. Just as when debugging other Java objects, you can
freely make use of tracing, watch variables, and other debugging techniques.
 |
If you are running the IDE on Java HotSpotTM technology, you must disable Java HotSpot
before restarting the client. |
Legal Notices