Debugging allows you to run a program interactively while watching the source code and the variables during the execution.

By breakpoints in the source code you specify where the execution of the program should stop. To stop the execution only if a field is read or modified, you can specify watchpoints .

Breakpoints and watch points can be summarized as stop points.

Once the program is stopped you can investigate variables, change their content, etc.


Now once the environment is set up in Adempiere we need to start the Product in Debug Mode of Desktop UI. In order to do that you must follow the following steps:-

  • Right Click on the Project and select the Debug As and Debug on Server which has Tomcat already selected.


  • When we have entered the Debug Mode, the First Class that comes up is Adempiere Class.
  • In Case of WEB UI it goes to Web UI which is the class for zk Web UI
  • Then the Login Page Opens Up, now in Order to debug we need to apply debug points which signify that the compiler needs to stop here while processing the code and wait for the user confirmation such that the code stops at that point.
  • We can Apply Debug points by double clicking on the code such that the Debug Point is created and once in Debug Mode the compiler will stop there.
  • Eclipse provides buttons in the toolbar for controlling the execution of the program you are debugging. Typically it is easier to use the corresponding keys to control this execution.
  • You can use the F5, F6, F7 and F8 key to step through your coding. The meaning of these keys is explained in the following table.


Table 1. Debugging key bindings / shortcuts

Key Description
F5 Executes the currently selected line and goes to the next line in your program. If the selected line is a method call the debugger steps into the associated code.
F6 F6 steps over the call, i.e. it executes a method without stepping into it in the debugger.
F7 F7 steps out to the caller of the currently executed method. This finishes the execution of the current method and returns to the caller of this method.
F8 F8 tells the Eclipse debugger to resume the execution of the program code until is reaches the next breakpoint or watch point.
  • The following picture displays the buttons and their related keyboard shortcuts.



  • The call stack shows the parts of the program which are currently executed and how they relate to each other. The current stack is displayed in the Debug view.


  • Changing variable assignments in the debugger

The Variables view allows you to change the values assigned to your variable at runtime. This is depicted in the following screenshot.


  • Now when we enter in Debugging Mode some classes need to be remembered in order to debug the code. For Instance we need to start with the Generic Class
  • Start by applying debug mode in the Web UI Class in the Init() such that the compiler stops in the method and Debug Mode is present.
  • Once in the class u can use F5, F6, F7 and F8 key to step through your coding and go through the flow.


For Different Processes and Windows we need to have multiple processes or classes such that when we need to Debug the process we call that Class.

The index for such is as Follows:-

Class in Eclipse Process Material Receipt, Shipment(Customer), Vendor Return, Customer Return, Purchase Order  &  Sales Order,

Invoice (Vendor) and Customer (Invoice) 

For Calculating Invoice Tax. Business Partner in Adempiere Login Class For Adempiere  such that while in case of change of login page or anything else in Login To change the Menu Entries we need to change the class when we need to add entry in the Adempiere ERP. To make Menus in WEBUI and add buttons. Create batches in WebUI and edit and add CodeCreate Inventory Batches in Physical Inv and Internal Use Inventory Debug this Class for adding buttons and defining where buttons go on click. To Add Products such and define parameters in it. Inventory Management such that,  Inventory and line Qty are Managed Processing Returns such that , both Customer RMA and Vendor RMA are created here. To Process Payments,  and to Allocate Payments to the InvoicesAllocate Payments , to the Invoices


  • If u need to debug these Processes u need to Apply Debug Points in the respective classes such that to change code there.
  • If u need to search any class in Eclipse u need to use the combination of Ctrl+Shift+T and enter the class name.
  • Use * with the name to increase your search criteria.
  • If u need to skip Debug points u can use the Button on the top of eclipse which looks like this    image008
  • Until unless u release this button the Debug won’t work.
  • Some Classes here as different from Desktop UI such that, in batch module in case of Desktop we have while in case of Window we have due to difference of frameworks.



-By Adempiere Support {India Portal}

About This Author

Post A Reply