wood burning stoves*
The moose likes IDEs, Version Control and other tools and the fly likes Debugging a web application in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Debugging a web application in Eclipse" Watch "Debugging a web application in Eclipse" New topic

Debugging a web application in Eclipse

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi all,

Suppose i have a small web application in my tomcat...And I want to debug the application in Eclipse...How can i do it...

Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
You have to set a breakpoint in your code. This can be done by doubleclicking on the left margin of your Java src file editor. Once you run the application the debugger is invoked and you have to switch to the Debug Perspective in eclipse which it does by asking you to switch to debug perspective once it encounters a breakpoint.

Use eclipse help tool to for more information on the Debug perspective.

Also, I think you have to setup your project as a tomcat project.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
I know how to debug if its a standalone application...but if it is a web application..how to track the flow of the application..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950

If you install the sysdeo plugin (http://www.sysdeo.com/eclipse/tomcatplugin) it will provide support for starting and stopping Tomcat inside of Eclipse and allow you to set breakpoints in webapp code.

A less pleasant way to get the same effect is to start a copy of Tomcat with Java Remote Debugging turned on and connect as a remote debugging session.

I recommend sysdeo. It's a little frustrating to get started initially - especially if you already have your webapp defined in Eclipse and have to go back and manually the make connections that would be done by the plugin when you create a new webapp with sysdeo already installed, but the end result is worth it.

Customer surveys are for companies who didn't pay proper attention to begin with.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Debugging a web application in Eclipse
Similar Threads
where i can find JSP class files?
Tomcat and Eclipse
how to start eclipse
creating a web application in eclipse
how to compile