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 (此時可以看到程序會停在本機設的斷點上,要提醒的是我們程序實際是跑在服務器上的,卻能使用本機的斷點,挺奇妙的!)
posted on 2008-12-10 17:09 Xiaobo Sun 閱讀(589) 評論(0) 編輯 收藏 所屬分類: J2EE