I don't know diddly about NetBeans -- but doing what you're asking about is
easy from Eclipse.  Assuming NetBeans has similar remote debug capabilities,
a similar technique may work for you.  (If NetBeans doesn't, change IDEs !)

The trick for us was to get Tomcat started in a way that allows remote
debugging.

>From our internal docs for doing this:

Tomcat 4.1.+ is a JPDA (Java Platform Debugger Architecture) compliant
application. That means it can be configured for remote debugging, and the
Eclipse IDE debugger can be used. 


Start Tomcat for debug
To set up Tomcat for remote debugging, it must be started with JPDA options.
The catalina.sh / catalina.bat files support JPDA options in the
environment, but you must start Tomcat directly with those files, rather
than startup.sh / startup.bat. Or create new startup_dbg.sh /
startup_dbg.bat files with your JPDA options. 

Under windows
I copied $CATALINA_HOME/bin/startup.bat to startup_dbg.bat, and made these
changes: 
at the end of the file, look for :doneSetArgs 
add the next two set command lines 
alter the call to include "jpda" before the start. Order is important! 
:doneSetArgs

set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000

call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
Note that if you replace the 'start' with 'run' in the above line, it will
execute in the lauch window. This is handy for catching the stack trace of
tomcat's failure to load. 


Under unix
copy $CATALINA_HOME/bin/startup.sh to startup_dbg.sh. The JPDA_* environment
variables are already set with good default values, in catalina.sh (which is
run by startup.sh) so just change the call: 
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

For more on JPDA connections, see
http://java.sun.com/products/jpda/doc/conninv.html

--
Dennis R. Sherman
Endeavor Information Systems
847-227-2976
[EMAIL PROTECTED]
http://www.endinfosys.com 

-----Original Message-----
From: William Bug [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 10, 2004 4:08 PM
To: [EMAIL PROTECTED]
Subject: debugging Axis server-side code from NetBeans (newbie) 


Hi All,

I've searched through the various NetBeans user lists & the Axis users 
lists in search of info on how to configure Axis (running in Tomcat) so 
that server-side Axis web service code can be debugged from within the 
IDE - i.e., step through code, use watches & breakpoints, etc.

There are a few cryptic posts, but I've not even been able to really 
figure out whether this is even possible.

I've gotten as far as I can observing the SOAP XML payloads with the 
fantastic TCPmon tool that comes with Axis.  I'm passing messages with 
attachments just fine, but I've hit a logic bug in the server-side code 
that I could spend many days trying to track down - if at all - without 
being able to step through the service code.

Is it possible to debug Axis server-side code from within NetBeans?

If so, is there a 'How-To' document that explains (in relative newbie 
terms) how to set this up.

Many thanks to all for any assistance you can offer.

Cheers,
Bill Bug

Bill Bug
Senior Analyst/Ontological Engineer

Laboratory for Bioimaging  & Anatomical Informatics
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA        19129
215 991 8430 (ph)

Reply via email to