Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug web application deployed on tomcat from eclipse?

Tags:

java

gwt

I am using GWT. i have deployed .war in tomcat. now i would like to debug it from eclipse.Please help me how to configure the steps?

Thanks!

like image 317
user1016403 Avatar asked Feb 15 '26 01:02

user1016403


2 Answers

Actually to debug web app remotely you have to add the following command lien options to tomcat: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n or run it using command line: catalina jpda start

Take a look here for details. Then you should connect to debug port using Eclipse (Run/Debug Configurations/Remote Java Application). But you are using GWT, so the better way to debug it is to refer to the GWT manual. GWT has a beautiful set of debugging tools.

like image 178
AlexR Avatar answered Feb 17 '26 13:02

AlexR


To debug through eclipse you must have run tomcat in debug mode. So first of all set following params in catlina file in bin as

set JPDA_TRANSPORT=dt_socket set JPDA_ADDRESS=5050

Then run tomcat server by using one of the following command from respective directory

..\jakarta-tomcat-5.5.7\bin>catalina jpda run ...or... ..\jakarta-tomcat-5.5.7\bin>catalina jpda start

I am using "jakarta-tomcat-5.5.7".

Then go 2 eclipse and setup for debug mode

in left tab select remote java application then select your respective project and set your connection properties.

Now you can debug.

like image 37
mevada.yogesh Avatar answered Feb 17 '26 15:02

mevada.yogesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!