Java remote debugging (JPDA) not working for me in Tomcat 9

后端 未结 3 678
失恋的感觉
失恋的感觉 2021-01-21 07:50

I\'m trying to remotely debug a Tomcat webapp on a recently upgraded Tomcat 9.0.13 and Open JDK 11.0.1. Server is Redhat Enterprise Linux 7.6 and I\'m using Eclipse on a Window

3条回答
  •  盖世英雄少女心
    2021-01-21 08:34

    I had this exact same issue. I'm running an application from a centos vm and trying to debug from my windows machine.

    I had to go into the catalina.sh file on the vm and make an edit. In the section that says that handles the jpda flag, the JPA_OPTS variable needed to be changed to JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=*:$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"

    Note the *: before the JPDA variable. This allows any ip address to have access to remote debugging. I believe by default it only allows local host.

    Hope this helps.

提交回复
热议问题