在Eclipse下debug 出现Source not found for ...

在Eclipse下调试Servlet出现了Source not found for XxxAction.execute(...)的问题,猜想是没有将Servlet代码加入到debug路径下,以致在调试的时候找不到Source,虽知道原因,却不知道怎么解决。只能在Eclipse 里乱逛,东点西击,不经意间终于发现了在问题所在。路径是Window --> Preferences --> Tomcat --> Source Path,在Source Path 标签下有行文字:Add java projects to source path(Eclipse debugger will search for source files in these projects),将要调试的project选中,然后在调试,果然OK了!!