Debug Fiji Plugin va Netbeans

Hi, I hope the data treats you well.

I’ve been banging my head on moving to ImageJ2 plugins in Maven from ImageJ1.X plugins using Ant, both with Netbeans. I can’t seem to find a way to debug using Netbeans and Fiji. I was previously debugging my ant based plugins in ImageJ1.X and then copying to my Fiji folder for testing.

I’ve had a few attempts at getting Maven to work, learning a lot about the pom file, and getting almost there. Following’s_Perspective I found that I was kinda close, but simply cloning the imagej-tutorials repo made things really easy.

I still have no clue how to debug my plugin inside of Fiji. I need to use a number of different plugins packed with Fiji so debugging in ImageJ1.X doesn’t make sense.

Any pointers would be much appreciated. I’m really surprised that this isn’t easier (or at least easier to find documentation online) given that Fiji is the default, and NetBeans is one of the obvious IDE choices. Am I missing something, and debugging in Fiji is not really the right way to do things?

Thanks in advance for your time.


Hi @nranthony,

I’m not quite sure about your problem. In case that’s useful, there’s also a screencast here:, but I think that you have gone beyond this point.

What do you mean by that ? Have you cloned this repository ?

In this example, there’s a main class which is launching a Fiji instance (from Netbeans or any other IDE) and from which you can debug your plugin. Isn’t it what you want ?

Let us know!



Hi Nicolas, thanks for the speedy reply,

I have cloned the repository, and can debug into what appears to be an ImageJ2 UI. It uses net.imagej.ImageJ for ImageJ2, right? I’m using the same example project, just using the Hello World example instead.

I need to debug within the Fiji UI directly. If this is not possible, is there a way to use maven to install plugins into the ImageJ2 plugins folder? Do these files live in the .m2 folder of my documents? Also, is it simple to use the old style UI? The new UI is a little strange to me.

Thanks for your time.

Hmm… So, not sure I can help you at this point, but maybe you can give a bit more information about your use case.

Yes, it’s imported at the beginning of the file (

What do you mean by that ? Do you want to debug out of the IDE ? Why would you want to do that ?

Is it because your plugin needs other plugins or update sites to work ?

Ok, so what I guess is that you want to test the interplay between a set of plugins and your plugin. Is this what you want ?

This repo may help:

Hi Nicolas, thanks for your time.

I might be describing things in a misleading way. I would like to use run my plugin in Fiji and have it connect to NetBeans for debugging, for step by step code evaluation and variable inspection. I do indeed have steps that require the plugins that come with Fiji. Specifically, I have a step that runs a macro, and that macro can have any combination of Fiji plugins and function calls. I wanted to keep this macro step, as it allows me to quickly change the application without having to go back to NetBeans and figure out how to program it. The app performs a few file logistics steps, followed by the macro processing (which will likely vary for different samples), and then another few logistics steps. The start and end will be the same but middle processing macro will be different and changing at the microscope setup.

I’ve tried to setup debugging use JDB put failed (not sure how close I got or even if it’s possible). I’ve also tried to use fiji.Debug and, parameters) but that didn’t work for me either.

Any tips would be much appreciated. Sorry if I’m missing something obvious.


1 Like


If that’s of any use, you can launch any script in a “main” test class before executing the plugin you want to debug. For instance this codes executes an IJ1 script before the main command:

Regarding attaching a debugger to a running ImageJ, I’m discovering thanks to you that it is possible… I will not be able to help! Maybe someone with more experience will join the conversation.



Hi Neil,

To get a (modern) Fiji / ImageJ plug-in to launch with the legacy UI from your IDE, add the dependency


to your POM file.

Best regards,

Wonderful, thank you both for your feedback.

I’ll continue to look into the remote debugging; if it can work with ImageJ then surely Fiji will should work too. I’ll report back here if I figure it out.

If anybody has debugged in Fiji I’d love to hear about.

Thanks for your time.


1 Like

I usually debug Fiji (Jython and Java) using Eclipse.

Here is how I do for Jython.

For Java I use the maven way.
I have to admit that I don’t write extremely big project, but for what I do I can import dependencies and debug.

hoping to being helpful,
Emanuele Martini