tomcat+eclipse 远程debug
1 在Linux环境上部署host项目,解压war包
jar -xvf smartBus-host-v1.war
2 配置tomact startup.sh 文件 加入:
##############remoteDebugStart###########################i
declare -xCATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7000"
###############remoteDebugEnd############################
3 启动host项目
ps -ef|grep java
./startup.sh 启动
4 配置本地eclipse(1配置地址和端口号 2引入项目包)
注:
debug:
vim startup.sh
ps-ef|grep java
kill -9 25190
./bin/startup.sh
//启动debug监听端口
nestat -an |grep 6000
//查看监听端口是否开启
netstat -an |grep 6000