. . .

Debugging

The development of a module can be simplified by tracking the course of an execution by means of remote debugging. This requires the Tomcat to run ApiOmat with debugging options. This is done in the tomcat configuration file located at /etc/apiomat/aom-yambas with Linux and in the tomcat service properties with Windows. The following parameters have to be set:

-agentlib:jdwp=transport=dt_socket, address=8000, server=y, suspend=n

These parameters might have to be set before any other parameters!

After a restart of Tomcat, there is one adjustment left to be done in Eclipse. For the module jar file that will be uploaded to be debugged correctly, it must explicitly be added to the Java Build Path. This is done by opening

Properties -> Java Build Path -> Tab "Libraries"

in the respective project and adding the "modul.jar" inside the "dist" folder. Prior to that the module must have been built at least once with the Ant task "Package".

After that the remote debugging can be begun. A new debug configuration of the type "Remote Java Application" has to be created for the project and must be filled in as follows:

  • Connection Type: Standard

  • Host: <hostname of the computer that runs Tomcat in debug mode>

  • Port: 8000

If not done automatically the own project needs to be added to the tab "Source Lookup".

If the module jar file is uploaded by using the Ant script after a break-point was set inside the onDeploy method of the module class, the debugger should stop there after a few seconds.

Further information: http://wiki.apache.org/tomcat/FAQ/Developing

* link only available in Enterprise Documentation