This illustration shows two windows: one with the proxy and one for the
client.
The proxy window contains the following commands:
% debugproxy -port 2286 start jdb -password
. ( wait until a debug agent starts up and
. contact this proxy... when it does, jdb
. starts up automatically and you can set
. breakpoints and debug the object, as follows:)
> suspend
> load SCOTT:Bank
> stop in Bank:updateAccount
> resume
> ...
The client contains the following code:
main( ... )
{
//retrieve the object that you want to debug
Bank b = (Bank)ic.lookup(sessURL + "/test/Bank");
DebugAgent dbagt = (DebugAgent)ic.lookup(svcURL + "/etc/debugagent");
//start the debug agent and give the proxy host, port, and a timeout
dbagt.start("tstHost",2286,30);
//lookup debugagent from JNDI
...
//execute methods within Bank)
...
//stop the agent when you want to
dbagt.stop();
//restart the agent when you want to
dbagt.restart(30);