eclipse使用maven tomcat插件部署沒法關聯源代碼

eclipse maven 起服務debug沒法關聯源碼

 

1. 安裝sourcelookup插件: 
update site: 
1) http://bjmi.github.io/update-site/ (3.8.2可用,後續描述均針對此插件) 
2) http://ifedorenko.github.io/m2e-extras/ (3.8.2不可用) 

2. 在source lookup path里加入: 
1) Maven Dependency(裝了插件纔有) 
2) Workspace(不加上連本身的代碼都沒法查看,默認是不加上的) 

打開source lookup path有三種方法: 
1) 在Debug Configurations裏選中左邊的運行項,再在右邊選擇source tab頁,點擊add則可加入source lookup path; 
2) 在Debug View裏右鍵運行的線程,選擇Edit Source Lookup...; 
3) 在斷點線程關連打開的class文件窗口中點擊Source Not found按鈕. 

3. 重啓調試程序(非eclipse) 

另外,若是不使用maven啓動服務,則可能不存在此問題,如使用下面兩個jetty插件啓動服務就不存在此問題: 
update site: 
1) http://eclipse-jetty.github.io/update/ 
2) http://run-jetty-run.googlecode.com/svn/trunk/updatesite/ eclipse

相關文章
相關標籤/搜索