jetty远程调试

  1. 写在前面:远程服务器开启2个端口,app使用一个,debug使用一个;本地IDE连接debug端口调试

  2. 服务端App启动参数中加入以下配置:

    -Xdebug

    -Xrunjdwp:transport=dt_socket,server=y,suspend=<suspend>,address=<port>

    -Xnoagent

    -Djava.compiler=NONE

    suspend is whether the launch of the container should first wait for a remote debugger to connect. If y, the container will wait for you to connect with your remote debugger before starting; if n the container will start immediately and at the same time listen on the remote debugging port.

    port is the port number to use for remote debugging.

    reference:Debugging the container and Myeclipse jetty远程调试

  3. 客户端IDE debug配置:

    b3119313b07eca80824f71f3922397dda1448358

    新建远程调试,此处对应你本地workspace中的项目

    8694a4c27d1ed21b5d1566f1ae6eddc450da3fc1

    配置对应的ip和端口,端口对应address=<port>

    95eef01f3a292df5f6e2e701bf315c6034a87384

  4. 设置断点,调试!就这么简单


你可能感兴趣的:(jetty,远程调试)