I’m trying to debug a plugin that works in GUI ImageJ, but fails in headless mode. I’ve tried three different methods: running an application with
net.imagej.Main; running an application with
ij.ImageJ; and using the
--debugger mode. Does anyone know the trick to any of these methods?
I’ve managed to set up IntelliJ with the plugin and to get it to run a headless ImageJ2 through
net.imagej.Main, but this class doesn’t seem to accept the -macro, -script, or --run keywords in program arguments. It gives me warnings, e.g.
[WARNING] Ignoring invalid argument: --run. I haven’t been able to find documentation for what arguments it does accept.
Is there a way to run a macro using the
net.imagej.Main class? Is there a documentation page for what arguments it does accept?
I tried using the ‘ij.Main’ class; this lets me run the macro using the keyword arguments, but it won’t run in headless mode. It always opens an IJ1 console and ignores the
How do you get headless mode to run when calling
Finally, I’ve tried using the --debugger mode: setting up IntelliJ to listen to a port, then calling ImageJ.exe through the console. I get a “The syntax of the command is incorrect” when I use the command that Intellij provides.
I’ve used both the “Shared memory” transport method using an address of “8000”
-agentlib:jdwp=transport=dt_shmem,server=n,address=8000,suspend=y,onthrow=<FQ exception class name>,onuncaught=<y/n>
and a “Socket” transport method with no Host = nothing or localhost, and several different ports.
-agentlib:jdwp=transport=dt_socket,server=n,address=MEDICALDEV15.Morgridge.net:8000,suspend=y,onthrow=<FQ exception class name>,onuncaught=<y/n>
Does anyone know what I’m doing wrong with these commands, or is my methodology for the debugger incorrect?