I recommend that you add a lot of debug output statements in your code to print out things like values of variables and basic checkpoints to confirm the correct path of the code is executed. A simple System.out.println(""); will print it out to a console. But a more robust logging approach is to use log4j Logger class which log your output to a file. There are examples of log4j in the resources I posted in the other thread.
A more advanced debugging technique is to start DevTest in JPDA (Java Platform Debugging Architecture). This allows you to see your code in your IDE executed in real-time. You can optionally add break points in your IDE and step through the code while inspecting runtime objects.
To do this with Eclipse IDE - you have to edit the vmoptions file for the appropriate DevTest component. For example, if you are creating a custom step then you'll want to edit Workstation.exe.vmoptions. If you are creating a custom data or transport protocol you'll want to edit the VirtualServiceEnvironment.exe.vmoptions and/or VirtualServiceEnvironmentService.exe.vmoptions, etc.
You'll need to add the following lines to the vmoptions file:
-Xdebug
-Xrunjdwp:transport=dt_socket,address=16000,server=y,suspend=y
In my example I'm using port 16000 (e.g. address=16000), but any available port can be used.
In Eclipse you'll need to add a new run configuration under Remote Java Application and specify the host and port where DevTest is running