eclipse maven 起服务debug无法关联源码
- 安装sourcelookup插件: update site:
- http://bjmi.github.io/update-site/ (3.8.2可用,后续描述均针对此插件)
- http://ifedorenko.github.io/m2e-extras/ (3.8.2不可用)
参考: https://github.com/bjmi/m2e.sourcelookup https://github.com/ifedorenko/com.ifedorenko.m2e.sourcelookup
- 在source lookup path里加入:
- Maven Dependency(装了插件才有)
- Workspace(不加上连自己的代码都无法查看,默认是不加上的)
打开source lookup path有三种方法:
- 在Debug Configurations里选中左边的运行项,再在右边选择source tab页,点击add则可加入source lookup path;
- 在Debug View里右键运行的线程,选择Edit Source Lookup...;
- 在断点线程关连打开的class文件窗口中点击Source Not found按钮.
- 重启调试程序(非eclipse)
另外,如果不使用maven启动服务,则可能不存在此问题,如使用下面两个jetty插件启动服务就不存在此问题: update site:
- http://eclipse-jetty.github.io/update/
- http://run-jetty-run.googlecode.com/svn/trunk/updatesite/