Tomcat 远程调试(remote debug)

1.设置 tomecat 参数 包括 启动debug模式,远程socket链接和监听端口等。在catalina.bat文件中最前面加入以下参数

SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

 

2.在eclipse或myEclipse中配置外部服务器 MyEclipse Externally Launched Server

菜单Run->Open debug dialog 

在 MyEclipse Externally Launched Server 新建一个填入你要调试的项目名称,Host:localhost Port:8000 。并勾选 Allowtermination of remote VM。

3.在外部启动你的tomcat服务器后 应该为 debug mode, 然后再在debug图标中选择远程调试即可。

http://blog.csdn.net/lryain/article/details/2902573

猜你喜欢

转载自nethub2.iteye.com/blog/2190633