Java项目开启远程调试的方法步骤(tomcat、springboot)
当我们运行一个项目的时候,一般都是在本地进行debug。但是如果是一个分布式的微服务,这时候我们选择远程debug是我们开发的利器。apache-tomcat-8.5.16Linux方法切换到你的tomcat的bin目录执行上面的命令就可以开启远程debug了,如果想配置一些信息,比如端口号什么的,请参考下面的说明。所以如果想修改配置,则如下操作:在catalina.sh中进行配置:或者通过JPDA_OPTS进行配置:The run goal forks a process for the boot application. It is possible to specify jvm arguments to that forked process. The following configuration suspend the process until a debugger has joined on port 5005These arguments can be specified on the command line as well, make sure to wrap that properly, that is:在执行jar的时候,添加上参数。如果出现首先检查一下端口8000的使用情况:可见当前16808端口服务被绑定了回环地址,外部无法访问。edit configurations远程调试配置 参数配置 将红框内的地址和端口号改成自己的。
下载地址
用户评论