Skip to content

Debugging Projection Java Code

Developer Studio now supports deploying and testing projection java implementations using IFS application, running locally in a docker container. Additionally, this allows developers to debug their java implementations using the Developer Studio.Note: In order to use this functionality, Docker desktop should be installed and running.

Steps to setup

Step 1
Add BuildHome
Make sure to use a proper, updated buildhome.
All the required jars, libraries and docker image tags will be fetched from the buildhome.

Step 2
Enable Service Layer
Enable Service Layer from the technologies panel in the project properties.

Step 3
Set a main database
Add new or find existing database which is compatible with the current target version and set it as the main database.
The main database is used as the database for the IFS Application running within the docker container.

Step 4
Fill details in the Service Layer panel
Fill out IFSSYS password and the credentials of the docker repository to use.
Default credentials can be found in the Developer Studio User Community Page in IFS Workplace.

Once this setup is done, two files are generated in the project root directory.

  • docker-compose.yml
    Contains all the details about ports and docker container tags to be used.
  • services_vars.env
    Contains all the environment variables to be used.

Note:   These files are fully generated and will be regenerated when the project is opened.

Step 5
Synchronize Libraries
Synchronize all the necessary libraries from the buildhome.
RMB on Application Server Node and Select Synchronize Libraries.

Note:   This might take a while for the first time.

Step 6
Generate Code
Generate Code for all the models inside the application server.

Step 7
Compile the written java files and create necessary jars.

Step 8
Deploy the created jars to the database.

Step 9
Start Server
Start the docker compose
The credentials provided is used to login to the docker repository and docker images are pulled based on the tags given in the buildhome.
Realtime logs can be monitored in the output window.

Step 10
Navigate to the localhost
Wait until all the server state is changed to -ready- The application is running on localhost port 8080
Once all the jars are downloaded and ready, the application can be found running at http://localhost:8080/main/ifsapplications/web/start

Step 11
Add break points
Open the java implementation files that need to be debugged, place breakpoints in the code by clicking on the line number in the page gutter.

Step 12
Attach the debugger
Attach debugger from the Developer studio.
Debug -> Attach Debugger...
The port is 18787

After the debugger is attached, go to the IFS application running on localhost and execute a function that triggers the breakpoint.
Developer Studio will trigger the breakpoint and the IDE will be converted to debugging mode.
After that, the java implementation can be debugged as a normal java application