carlosCharz / jvisualvmtomcat

Connect a Java profiler like JVisualVm or JConsole to a remote tomcat running on AWS EC2 (Amazon Linux AMI)
8 stars 2 forks source link

unable to connect with tomcat in debug mode using eclipse using same method. #1

Closed Yogendra0Sharma closed 5 years ago

Yogendra0Sharma commented 5 years ago

EC2 tomcat -> /bin/setup.env

export CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9000,server=y,suspend=n"
export JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=n"

setup tunnel and configure eclipse in debug mode.

carlosCharz commented 5 years ago

Hi, I have not tested with tomcat debug mode in Eclipse. I hope someone else can sort it out how to solve it. I will try to check it out. Thanks!

Yogendra0Sharma commented 5 years ago

Hi, I have not tested with tomcat debug mode in Eclipse. I hope someone else can sort it out how to solve it. I will try to check it out. Thanks!

I resolve this issue. Thanks We have to set following env variable in setenv.sh

JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n $JPDA_OPTS"

connect with eclipse:- debug configuration -> use localhost & 8000 port.