如何在eclipse中远程调试ofbiz

 我来答
千锋教育
2015-12-11 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
展开全部
Step 1: Run OFBiz in debug mode
Normally we start OFBiz with the command line
%JAVA_HOME%\bin\java -jar ofbiz.jar

To start in debug mode use the command line
%JAVA_HOME%\bin\java \-Xdebug \-Xnoagent \-Djava.compiler=NONE \-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 \-jar ofbiz.jar

This changed command line instructs java to run in debug mode listening for a socket connection on port 8091 for a debugger to connect. You can change the port number to any port not otherwise being used.
Step 2: Connect to OFBiz with Eclipse as a Debugger
Before connecting you have to create a new debug configuration.
In Eclipse choose Run->Debug... from the menu. A Debug window should pop up.
Select Remote Java Application from the tree on the left.
Click New (button on the bottom left).
Type a name at the top (OFBiz, perhaps?)
On the Connect tab
Pick ofbiz for the project
Select Standard (Socket Attach) for Connection Type
Type localhost for host
Type 8091 (or whatever port you chose) for port
On the Source tab
Click Add Projects... (buttons on the right)
Select the ofbiz project
Click Apply If you have OFBiz running debug (Step 1 above) you can start debugging by clicking Debug (on the bottom) now.
You know that you are connected when you see a start/stop button in the debug perspective of Eclipse.
First created by Jarrod Ribble
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式