I am working on a web application using the Eclipse Java IDE.
I am using Tomcat 6 as my servlet container.
The tools available for Java, inculding Eclipse, seem to lack debugging capabilities for web applicatons (as compared to Visual Studio for the .NET platform).
How can I debug my web app using Eclipse?
run tomcat in debug mode (java option -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
) and then use remote debug in Eclipse (Debug Configurations -> Remote Java Aplication) and connect to server on configured port (e.g. 8000 in this example).
If you want to debug your web application, set breakpoints where desired and run Tomcat on debug mode. If you logged your exceptions or placed INFO
/DEBUG
messages, you can view them on Console
(if ConsoleAppender
is used).
The essential thing is that your application runs on debug mode. For browser side debugging (as @Thomas said), there's tools like Chrome Debugger (for Google Chrome), Firebug (for Firefox) and Firebug Lite (for other browsers).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With