How to set up SAFE X3 Studio for Eclipse for Debugging

1 minute read time.

The setup involves two configurations, namely, Eclipse and Sage X3 side. 

First part we will set up the Sage X3 to use Eclipse with the following:

  • Go to User function (GESAUS)

Parameters > Users > Users

  • Select the relevant user record
  • Go to Parameter tab
  • Locate to Chapter > Supervisor, Group > Dev, and Select row action (Right-hand) and select Detail from the drop-down menu
  • On the listed parameter carefully fill in the following:

AECLIDBG -> Yes

AECLIDBGTR -> Yes

AECLIMAC -> (Web server name)

AECLIPRT -> 10000

AECLIPSE -> Yes

  

Second part we will need to set up eclipse to be able to communicate with Sage X3

  • Download Eclipse Indigo (Incl. Sage ERP X3 plug-in)

Link: http://pluginx3.sage.fr/safex3/studio/downloads/downloads.html

  • Upgrade to Eclipse Indingo SR2, see below steps:
  • Run eclipse
  • Go to Help
  • Select Check for updates
  • Select latest version (SR2) and update
  • Open eclipse then go to Project > User Parameters (See image below)

   

  • On the User parameter fill in your Debugger machine and port, like the ones on your Sage X3 environment.

Note. If you followed these steps properly these parameters will fill by default

 

  • To start debugging X3 code, do the following:
  • On X3, open your script/file.
  • Go to Debug perspective (Window > Perspective > Open perspective > Debug)
  • Go to Attach to process (Project > Attach process) and you will see the list of sessions.
  • Select your process the click Attach

 

  • Put your cursor on the line in your script where you need to start the debug process
  • Double-click next to the line number and a blue dot will appear indicating where you going to start debugging.

 

  • If you don’t want to use the method mentioned above you can use the Dbgmode (Enables the debugger to work) and Dbgaff (Activate the debuger) variable which you add like the illustrated image below, on the line you want to debug

   

  • In Sage X3, Run your function attached and when the code gets to your debug it will stop then you begin to Step into your code 

Additional information:

Sometimes when you are launching your debugger you may get an error message shown below:

Error: Debugger not active. Launch impossible

Steps to resolve this issue:

  • On your server, on firewall rules you should open an inbound/outbound traffic for that port shown on the error message

Links:

https://support.na.sage.com/selfservice/viewdocument.do?noCount=true&externalId=89057&sliceId=1&isLoadPublishedVer=&docType=kc&docTypeID=DT_Article&stateId=1527&cmd=displayKC&dialogID=127095&ViewedDocsListHelper=com.kanisa.apps.common.BaseViewedDocsListHelperImpl&openedFromSearchResults=true 

https://online-help.sageerpx3.com/erp/12/staticpost/dbgmode/?highlight=Dbgaff

https://online-help.sageerpx3.com/erp/12/ticket/how-to-set-up-safe-x3-studio-for-eclipse-for-debugging/?highlight=Debugging+in+eclipse