Pre Gradle version
This page document the usage with Gradle, the pre-Gradle documentation is here: Running and Debugging OFBiz in Eclipse
Table of contents
1. Debugging OFBiz in Eclipse
Before we also used to debug or run OFBiz inside Eclipse, but this is no longer documented here as long as the "Can't find bundle for base name cache, locale en" bug is not fixed.
Step 1: Run OFBiz in debug mode
Normally we start OFBiz with the command line
gradlew ofbiz
To start in debug mode use the command line
gradlew ofbizDebug
This run in debug mode listening for a socket connection on port 5005 for a debugger to connect.
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
5005
- Pick
- On the Source tab
- Click
Add Projects...
(buttons on the right) - Select the ofbiz project
- Click
- Click
Apply
If you have OFBiz running debug (Step 1 above) you can start debugging by clickingDebug
(on the bottom) now.
You know that you are connected when you see a start/stop button in the debug perspective of Eclipse.