<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to debug Ivy Script?</title><link>https://answers.axonivy.com/questions/2183/how-to-debug-ivy-script</link><description>&lt;p&gt;Hi,
I'm currently extending a existing Ivy application. I face the problem of being unable to debug (trace) Ivy script.&lt;/p&gt;
&lt;p&gt;Is there some tooling?
maybe some trick to output directly into the "runtime log" of the designer?&lt;/p&gt;
&lt;p&gt;I've already hack the logger to display SQL and such. I'm familiar with web development, java, tomcat and most of the ecosystem. I just have hard time tracing the logic in process. I currently have a bug with Ivy add on, I replace all parameter values one by one with hardcoded values to see what is going on. I've figure out which variable is erroneous but can't figure out what's in it.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2183/how-to-debug-ivy-script" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 15 Nov 2016 09:20:47 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2183/how-to-debug-ivy-script/2187</link><description>&lt;p&gt;You can use the 'ivy.log' API to write logs into the runtimeLog. E.g. &lt;code&gt;ivy.log.info("this is my parameter:"+ strInput);&lt;/code&gt;
The logger is also available in plain Java via &lt;code&gt;Ivy.log().info("hello logger");&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;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: &lt;a href="http://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer"&gt;http://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 15 Nov 2016 09:20:47 -0500</pubDate><guid>https://answers.axonivy.com/questions/2183/how-to-debug-ivy-script/2187</guid></item></channel></rss>