The following instructions for debugging Micro-Manager’s Java code with IntelliJ are intended to work on Windows or Mac. Updated for 2.0-gamma
(See also: Writing plugins for Micro-Manager)
Download and install a recent Micro-Manager nightly build. We will refer to the installed Micro-Manager directory as
Use git to clone the micro-manager source code 1. We’ll refer to the root source directory as
Choose Create New Project
Name the Project (i.e. Micro-Manager2), and select the JDK (11 may work, but MM is developed with JDK8).
Select the project and right click and find “Open Module Settings (F4)”.
Click on “Add Content Root”. From
$SRCDIRselect mmstudio/src/main/java and mmstudio/src/main/resources
In the Project Settings dialog, select “Libraries”. Use the “+” button in the second column to add libraries. If you have ant installed and ran ‘ant -f buildscripts\fetchdeps.xml before, add
$SRCDIR/dependencies/artifacts/compile. If you did not, you can try adding the plugins/micro-manager directory of your micro-manager installation. You will also need to supply MMAcqEngine.jar and MMCoreJ.jar, which you either build yourself, or that can be found in
$INSTALLDIR/plugins/micro-manager. Click “OK”
in the IntelliJ menu, select Run > Edit Configurations. Add new Configuration, type “Application”.
#* Main Class: type in
#* VM options: type in
-Xmx3000M. This sets the maximum memory
(megabytes) used by Java .Also add
#* Working Directory: type in your
- You should now be able to Run and Debug the code.