Menu

Debugging

kainzp
Attachments
debug-menu-structure.png (12523 bytes)
dependencies-iqm-app.png (64664 bytes)
remote-debug-config.png (77553 bytes)

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.

Run the debugger

Add your plugin-project as project dependency to the iqm-app module in Eclipse:
add the plugin project to the dependencies of the iqm-app project

Now run the application (iqm-app module) in debug mode.

Note: This may put the plugin's menu item directly to the Plugins/Image or Plugins/Plot menu without any hierarchy. If you develop in the standard checked out folder structure, you may get a menu structure like Plugins/Image/<your-dev-path>/<your-plugin-menu-item-name>. But that's OK, since you do not run a packaged version yet.
add the plugin project to the dependencies of the iqm-app project

Remote Debug the Plugin

A more tedious way to debug is remote-debugging of an already deployed plugin. You may consider this option, if

  • you don't want to check out the entire application
  • you encounter errors in your plugin/operator you cannot locate via logging or console output
  • you don't have any output on the plugin's/operator's activity

Prerequisites

  1. Eclipse and IQM installed
  2. Your plugin installed in the /plugins/* folder of IQM

Run the debugger

  1. I will use Eclipse as debugger and launch the JVM with the following initial debug arguments:
    java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=19000 -jar /path/to/IQM/iqm[-version].jar

This will wait for Eclipse to connect to port 19000 until progressing with the startup.

  1. Set some breakpoints in order to suspend the JVM at the specified location.
    Now, select your plugin project in Eclipse, go to Run --> Debug Configurations... and configure an Eclipse remote debug session, then hit Debug.
    The remote debug configuration

  2. Execute the plugin. The debugger will now suspend the JVM at the specified location and lets you examine the variables at runtime.
    Suspended VM in remote debug mode using Eclipse


Related

Wiki: Getting Started

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB