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

后端 未结 3 682
失恋的感觉
失恋的感觉 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:40

    In case you are on Windows and using Tomcat as Service 64-bit. Then it would be needed to change in the Windows registry. This registry path:

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\\Parameters\Java
    

    With 32-bit Windows this path will be without WOW6432Node. There is a string value Options and remote debug can be enabled by adding these 2 lines there

    -Xdebug
    -Xrunjdwp:transport=dt_socket,address=*:4446,server=y,suspend=n
    

    if you do not put *: to address parameter, then remote debug will be possible only from localhost. *: means you can connect from anywhere/any host to the tomcat for debugging.

    Tomcat9ServiceName - is the name of the Tomcat Service which shown in the screenshot below and usually you type it during the installation

提交回复
热议问题