首页 > 编程语言 > 详细

idea + springBoot项目配置远程调试

时间:2019-11-20 13:17:09      阅读:232      评论:0      收藏:0      [点我收藏+]

1.打包springBoot项目包放在linux服务器上

2.贴上启动项目的批处理代码

#!/bin/bash 

export BUILD_ID=dontKillMe
pid=`ps -ef | grep /home/rivamed/fw-fhvc/flvcat-hvc-exec-v2.0.0.11.war | grep -v grep | awk {print $2}`
if [ -n "$pid" ]
then
kill -9 $pid
fi
#指定最后编译好的jar存放的位置
www_path=/home/rivamed/fw-fhvc

#Jenkins中编译好的jar名称
jar_name=flvcat-hvc-exec-v2.0.0.11.war
source /etc/profile
#进入最后指定存放jar的位置
cd  ${www_path}
war_path=${www_path}/${jar_name}
config_path=${www_path}/config

echo "开始启动"

nohup java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8401 -Dfile.encoding=UTF-8 -Dcas.standalone.config="$config_path" "$war_path" > nohup.out 2>&1 &
> nohup.out
tail -f nohup.out

因为在启动命令上加上了一下指令 才能使用远程调试

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

3.idea中配置远程调试

选择Edit Configurations

技术分享图片

 

 添加启动配置

技术分享图片

 

 编辑配置

技术分享图片

 

 效果预览

技术分享图片

 

 

技术分享图片

 

idea + springBoot项目配置远程调试

原文:https://www.cnblogs.com/guanxiaohe/p/11896339.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!