<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Debugging</title><link>https://sourceforge.net/p/iqm/wiki/Debugging/</link><description>Recent changes to Debugging</description><atom:link href="https://sourceforge.net/p/iqm/wiki/Debugging/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 25 Jun 2013 08:35:00 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/iqm/wiki/Debugging/feed" rel="self" type="application/rss+xml"/><item><title>Debugging modified by kainzp</title><link>https://sourceforge.net/p/iqm/wiki/Debugging/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,3 +1,5 @@
+[TOC]
+
 #Debugging#
 ##Debug the Plugin/Operator directly##
 If you already have checked out all IQM modules according to [Getting Started], you are good to go. Otherwise, you will have to check out all iqm-modules and build the corresponding Eclipse projects.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kainzp</dc:creator><pubDate>Tue, 25 Jun 2013 08:35:00 -0000</pubDate><guid>https://sourceforge.net892f20e288f45baaa4e7ecad6084b2e55c4dc48d</guid></item><item><title>Debugging modified by kainzp</title><link>https://sourceforge.net/p/iqm/wiki/Debugging/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -33,5 +33,5 @@
 [[img src=remote-debug-config.png alt="The remote debug configuration"]]

 3. Execute the plugin. The debugger will now suspend the JVM at the specified location and lets you examine the variables at runtime.
-[[img src=remote-debug-breakpoint.png alt="Suspended VM in remote debug mode using Eclipse"]]
+[[img src=remote-debug-breakpoint.png alt="Suspended VM in remote debug mode using Eclipse" width="75%"]]

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kainzp</dc:creator><pubDate>Tue, 25 Jun 2013 08:34:13 -0000</pubDate><guid>https://sourceforge.neted81fd20178be1dfa5f2d8c918ac0734ccf992c1</guid></item><item><title>Debugging modified by kainzp</title><link>https://sourceforge.net/p/iqm/wiki/Debugging/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kainzp</dc:creator><pubDate>Tue, 25 Jun 2013 08:31:59 -0000</pubDate><guid>https://sourceforge.net69ef525c8e2ca11e2dcadedf07bb4be167fd1972</guid></item><item><title>Debugging modified by kainzp</title><link>https://sourceforge.net/p/iqm/wiki/Debugging/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="debugging"&gt;Debugging&lt;/h1&gt;
&lt;h2 id="debug-the-pluginoperator-directly"&gt;Debug the Plugin/Operator directly&lt;/h2&gt;
&lt;p&gt;If you already have checked out all IQM modules according to &lt;a class="alink" href="/p/iqm/wiki/Getting%20Started/"&gt;[Getting Started]&lt;/a&gt;, you are good to go. Otherwise, you will have to check out all iqm-modules and build the corresponding Eclipse projects.&lt;/p&gt;
&lt;h3 id="run-the-debugger"&gt;Run the debugger&lt;/h3&gt;
&lt;p&gt;Add your plugin-project as project dependency to the &lt;code&gt;iqm-app&lt;/code&gt; module in Eclipse:&lt;br /&gt;
&lt;img alt="add the plugin project to the dependencies of the iqm-app project" src="./attachment/dependencies-iqm-app.png" /&gt;&lt;/p&gt;
&lt;p&gt;Now run the application (iqm-app module) in debug mode.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This may put the plugin's menu item directly to the &lt;code&gt;Plugins/Image&lt;/code&gt; or &lt;code&gt;Plugins/Plot&lt;/code&gt; menu without any hierarchy. If you develop in the standard checked out folder structure, you may get a menu structure like &lt;code&gt;Plugins/Image/&amp;lt;your-dev-path&amp;gt;/&amp;lt;your-plugin-menu-item-name&amp;gt;&lt;/code&gt;. But that's OK, since you do not run a packaged version yet.&lt;br /&gt;
&lt;img alt="add the plugin project to the dependencies of the iqm-app project" src="./attachment/debug-menu-structure.png" /&gt;&lt;/p&gt;
&lt;h2 id="remote-debug-the-plugin"&gt;Remote Debug the Plugin&lt;/h2&gt;
&lt;p&gt;A more tedious way to debug is remote-debugging of an already deployed plugin. You may consider this option, if &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;you don't want to check out the entire application&lt;/li&gt;
&lt;li&gt;you encounter errors in your plugin/operator you cannot locate via logging or console output&lt;/li&gt;
&lt;li&gt;you don't have any output on the plugin's/operator's activity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Eclipse and IQM installed&lt;/li&gt;
&lt;li&gt;Your plugin installed in the /plugins/* folder of IQM&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="run-the-debugger_1"&gt;Run the debugger&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;I will use Eclipse as debugger and launch the JVM with the following initial debug arguments:&lt;br /&gt;
&lt;code&gt;java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=19000 -jar /path/to/IQM/iqm[-version].jar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This will wait for Eclipse to connect to port 19000 until progressing with the startup.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set some breakpoints in order to suspend the JVM at the specified location.&lt;br /&gt;
Now, select your plugin project in Eclipse, go to &lt;code&gt;Run --&amp;gt; Debug Configurations...&lt;/code&gt; and configure an Eclipse remote debug session, then hit &lt;code&gt;Debug&lt;/code&gt;.&lt;br /&gt;
&lt;img alt="The remote debug configuration" src="./attachment/remote-debug-config.png" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execute the plugin. The debugger will now suspend the JVM at the specified location and lets you examine the variables at runtime.&lt;br /&gt;
&lt;img alt="Suspended VM in remote debug mode using Eclipse" src="./attachment/remote-debug-breakpoint.png" /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kainzp</dc:creator><pubDate>Tue, 25 Jun 2013 08:30:26 -0000</pubDate><guid>https://sourceforge.net0c9f790dbb7146ba193f633a80afbc5e4669dafc</guid></item></channel></rss>