You can use the 'ivy.log' API to write logs into the runtimeLog. E.g. `ivy.log.info("this is my parameter:"+ strInput);`
The logger is also available in plain Java via `Ivy.log().info("hello logger");`
There is no way to really debug ivyScript. But you can always factor out ivyScript code and wrap it in a JavaClass. Java code can be debugged as described here: http://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer