Fabasoft app.ducx allows you to debug use case implementations written in Java or Fabasoft app.ducx Expressions from within your development environment.
Before you can debug an app.ducx project in Eclipse, make sure that the COOJAVA_JVMOPTIONS environment variable is set to -agentlib:jdwp=server=y,transport=dt_socket,address=8000,suspend=n. You may also use a port other than “8000” by setting the address parameter to the desired value. Keep in mind, that only one JVM can be bound to the same socket, otherwise the JVM will not be initialized.
Note: You can also use the COOJAVA_JVMOPTIONS environment variable to set other parameters for the Java virtual machine, e.g. the -Xms and -Xmx parameters for defining the size of the heap space. Adjusting the size of the heap space might be necessary if you run into the following Java runtime error:
java.lang.OutOfMemoryError: Java heap space
The COOJAVA_JVMOPTIONS environment variable can also be individually defined for each web service instance in order to avoid conflicts if multiple web services are hosted on a single machine.
To define the COOJAVA_JVMOPTIONS environment variable for a particular web service instance, add the following entries to the registry:
Note: If you are manually adding the described entries to the registry using the Registry Editor, you have to create the keys that do not exist yet. The “@” character in the example refers to the “(Default)” registry value.
Adapt the path to the virtual directory associated with your web service as appropriate. The correct path can be obtained by carrying out the following steps:
After setting the environment variable, the Fabasoft Folio Web Service must be restarted. If you are using Microsoft Internet Information Services to host the Fabasoft Folio Web Service, do not issue an iisreset command but restart the “World Wide Web Publishing Service” in the “Services” snap-in instead.
In order to verify that the remote debugging listening port has been installed correctly issue netstat -a | more and search the output for the specified listening port (e.g. 8000).
Furthermore, you have to create a new debug launch configuration in Eclipse. To do this, select the Debug from the Run menu. This will bring up the dialog box depicted in the next figure. Select “Remote Java Application” and click New Launch Configuration. Enter a Name for the debug launch configuration, select the Project, enter the name of the web server hosting the Fabasoft Folio Web Service in the Host field, click Apply to save your settings, and Debug to attach the remote debugger to the remote Java virtual machine.
Once a debug launch configuration has been created, you can start debugging your Java use case implementations.
You can set breakpoints in your Java code by clicking Toggle Breakpoint in the context menu in the corresponding line of code. When you click Debug from the Run menu, select your debug launch configuration and click Debug to run your Fabasoft app.ducx project. Execution will stop when a breakpoint is reached to take you to the Eclipse Debugger (see next figure).
You have to create a new debug configuration before you can debug an Fabasoft app.ducx project in Eclipse. To do so, click “Debug Configurations“ on the “Run” menu.
In the dialog box, select “Fabasoft app.ducx” click the “New launch configuration” symbol and enter a Name for the new launch configuration and select the Project by clicking “Choose“. To specify how the Fabasoft app.ducx project should be debugged, click the “Debug” tab. Following options are available:
Click “Apply” to save your settings, and “Debug” to debug the Fabasoft app.ducx project.
Breakpoints can be set in every app.ducx Expression block with one of the following methods:
Note: Microsoft Windows: To extend the time a thread is kept in the application pool when waiting on a break point, set the (Default) value to 2147483647 of following registry key:
In normal circumstances this should not be necessary.
The debug information is displayed in the debug perspective. To switch to the debug perspective, open the “Window” menu, point to “Open Perspective” and click “Other”. Select “Debug” and click “OK”. The Debug perspective provides you debugging information like the call stack, values of variables and so on.
Following common debug commands are available: