File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes web application debugging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "web application debugging" Watch "web application debugging" New topic

web application debugging

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 580
I am using eclipse for developing struts 1.2 based application.My web server is Tomcat.I do not know how to debug the application.

Thanks in advance
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46337
Generally you can debug a program by double-clicking the left margin of the editor until you get a round blob which represents a breakpoint (blue on eclipse, red on NetBeans). Your execution stops when you get to the 1st breakpoint, then you can use the step-into, step-over and step-return instructions to go to the next line, to the next line without seeing details of the method call, and to the end of the method.
At all stages you can get a debug perspective which shows details of all the fields and local variables.
You can probably use f keys (I think f5 f6 f7) instead of step-into step-over and step-return.

Don't know whether there are special methods for Struts and Tomcat. Sorry
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

There's no need for special debugging assistance in Struts, but in order to debug any Tomcat application, the Eclipse debugger has to connect to Tomcat.

If you're using the sysdeo Tomcat plug-in or something similar, this is done when you use Eclipse to start Tomcat. For stand-alone Tomcat applications, start Tomcat with remote debugging turned on (this doesn't have to be on a remote machine). Then create a remote debugging profile in Eclipse (use the Debug dialog) and connect to the running copy of Tomcat in the same way you'd connect to any external Java application.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: web application debugging
jQuery in Action, 3rd edition