Configuring Your IDE to Run Debug OpenMigrate with ANT - tsgrp/OpenMigrate GitHub Wiki

With some leg work, OpenMigrate can be run within your IDE so you can test code and configuration updates immediately without have to rebuild OM and run it from the command line. You can also place breakpoints to debug through code by configuring in this manner. See instructions below for how to configure Eclipse and IntelliJ to run OpenMigrate.

Run and Debug in Eclipse

If you haven't yet imported OpenMigrate into Eclipse, please reference this guide to import the project correctly. If you have Build Path issues outstanding with your OpenMigrate project, please reference this subsection to clean the project before debugging.

Setting up a Debug Configuration

  1. Go to Run > Debug Configurations.
  2. Click "Java Application" and press the "New" button.
  3. Give your debug configuration a name.
  4. Project should be the "code" folder, which includes all the modules and projects.
  5. Use "com.tsgrp.migration.CommandLine" as the "Main class".
  6. Check "Include system libraries when searching for a main class."
  7. Navigate to the "Arguments" tab.
  8. In "Program arguments", type: "-config app-ctx.xml"
  9. In "VM arguments", type: "-Denv={COMPUTERNAME} -Dtenant={COMPUTERNAME}"
  10. For "Working directory", select "Other" and choose your project folder, which contains the om.bat, your setenv file, and the config folder.
  11. Navigate to the "Classpath" tab.
  12. Click "User Entries".
  13. Click "Advanced..." > "Add Folders" and add the project folder and its config subfolder.
  14. Click "Advanced..." > "Add Folders" and add the core folder/s config subfolder.
  15. Click "Debug" to start debugging!

TODO: copy from wiki or TSG KB

Run and Debug in IntelliJ

IntelliJ (as of version 14.0.3) does not provide an easy way to set your classpath on your debug configuration like Eclipse does. Therefore you have to set your classpath properly on your module itself.