Tomcat remote debugging with Eclipse (JPDA debugging)
===============Tomcat setting -- enable JPDA debugging================================>cd %CATALINA_HOME%\bin
>SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888
>catalina start
================Eclipse Setting===================================================
Debug Configuration->Remote Java Application->new
--Connect--
Name: Debug Tomcat
Project: jpetstore (which project is copied to the tomcat)
Host: localhost
Port: 5888
--Source--
all libs and src (此時(shí)可以看到程序會(huì)停在本機(jī)設(shè)的斷點(diǎn)上,要提醒的是我們程序?qū)嶋H是跑在服務(wù)器上的,卻能使用本機(jī)的斷點(diǎn),挺奇妙的!)
posted on 2008-12-10 17:09 Xiaobo Sun 閱讀(589) 評(píng)論(0) 編輯 收藏 所屬分類: J2EE