NOTE: This article describes debugging Java transformations. If you are looking for information about CTL debugging instead, read our blogpost here: http://blog.cloveretl.com/code-debugging-cloveretl-designer
Sometimes when you need to define your own Java trasformation you might find it useful to debug your code. This used to be an easy task before a new runtime was introduced (since 4.0 release), as all you had to do was to set your breakpoints and press F11. However, this is no longer enough in later versions.
The new runtime runs as a new Java process along with Designer - therefore in order to debug your Java transformation this process has to run in debug mode and then debugged using “Remote Java Application” debug configuration. The debug mode for the runtime is configured in the Designer in Window > Preferences > CLoverETL > ETL Runtime > VM parameters:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4444
DebugConfiguration-RemoteJavaApplication.png
Now, you can add breakpoints into your Java code wherever you need them:
AddBreakpoint.png
As soon as you have set your breakpoints, you can run the graph that uses your custom Java transformation. You might be asked to switch to Debug perspective, where you can finally debug your transformation.