<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I debug my Java class in the Designer?</title><link>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer</link><description>&lt;p&gt;I use a lot of Java code in my Ivy projects and I desperately need to debug them. If I set a break point in the source code, the execution does not stop at the break point. &lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 20 Nov 2014 05:05:30 -0500</lastBuildDate><item><title>Answer by hungnam</title><link>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/1041</link><description>&lt;p&gt;here is my way to remote debug Ivy Server 5.1&lt;/p&gt;
&lt;p&gt;For Window: put the following param to bin/.ilc file, the .ilc file must be named to the correct server executable file, for example, if server launched by AxonIvyEngineC.exe, then the .ilc file name must be AxonIvyEngineC.ilc&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ivy.vm.additional.options=-agentlib:jdwp=transport=dt_socket,server=y,address=9000,suspend=n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For Linux. i.e Ubuntu 12.04 : put the following param to bin/AxonIvyEngine.conf&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,address=9000,suspend=n"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then create remote debug from Ivy designer/Eclipse to server with port 9000&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hungnam</dc:creator><pubDate>Thu, 20 Nov 2014 05:05:30 -0500</pubDate><guid>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/1041</guid></item><item><title>Answer by Nikel Weis</title><link>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/30</link><description>&lt;p&gt;...another possibility would be to write a main method with test data and use regular eclipse java debugging facilities.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikel Weis</dc:creator><pubDate>Fri, 18 Oct 2013 11:08:29 -0400</pubDate><guid>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/30</guid></item><item><title>Answer by SupportIvyTeam</title><link>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/22</link><description>&lt;p&gt;Unfortunately you have to use a tiny special little trick. You have to use remote debugging. To activate remote debugging in the Designer, please open the file &lt;em&gt;Xpert.ivy Designer.ini&lt;/em&gt; in the installation directory of the Designer and add the following line at the end of the file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this additional JVM argument you permit to a remote debugger to connect with the JVM on port 8001 to debug. &lt;/p&gt;
&lt;p&gt;After that, restart the Designer. As a second step, please go to &lt;em&gt;Run -&amp;gt; Debug Configurations&lt;/em&gt; and create a new &lt;em&gt;Remote Java Application Debugging&lt;/em&gt; configuration. In the configuration, choose the project that you want to debug, set the host and the port (localhost and 8001). And now start the fun with clicking on the &lt;em&gt;Debug&lt;/em&gt; button. From now on, the break points will suspend the execution of the Java class so that you can quietly debug your code.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Launch configuration for Remote Java Application Debugging" src="/upfiles/remote_debug.png"&gt;&lt;/p&gt;
&lt;p&gt;On the server:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Since 7.4:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You have to add the line &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n&lt;/code&gt; in &lt;code&gt;[engineDir]/configuratoin/jvm.options&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before 7.4:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You have to add the same line into the entry &lt;code&gt;ivy.vm.additional.options&lt;/code&gt; of the ilc file for the server executable. See the chapter &lt;em&gt;Tools Reference/Windows Program Launcher Configuration&lt;/em&gt; for more details about ilc files.&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;br&gt;
Note: This question and answer was &lt;a href="http://blog.xpertivyhacker.ch/2013/02/java-klassen-mit-xpertivy-debuggen.html"&gt;originally posted&lt;/a&gt; by Heinrich Spreiter on his &lt;a href="http://blog.xpertivyhacker.ch/"&gt;Xpert.ivy Hacker blog&lt;/a&gt;. Henry, many thanks to you for your enthusiastic work. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SupportIvyTeam</dc:creator><pubDate>Tue, 08 Oct 2013 16:06:37 -0400</pubDate><guid>https://answers.axonivy.com/questions/21/how-can-i-debug-my-java-class-in-the-designer/22</guid></item></channel></rss>