Debug menu missing in Fiji editor
"You can debug a macro using the commands in the Debug menu…"

I can not find this menu.
I am using the editor that comes up when you click [Create] in the FIJI macro Recorder.
Is there another editor that is better suited to debugging?

This suggestion helps to open the default ImageJ editor with a debug menu:


As is blocked by corporate firewalls, I summarize the discussion of Oct 29, 2014 here:
I can confirm that this Clipboard workaround still works 10/2016.

Q: (Michael Fray) I’ve tried opening macros in FIJI by Plugins > Macros > Edit… or by Plugins > New > Macros, and I can’t see any menu options for debugging. I’ve also tried starting the debug mode by using D, or or D, etc. with a macro open, with no luck.
A1: (Wayne Rasband) Open the macro in the Fiji Script Editor, type cmd-A (Select All), cmd-C (Copy), close the Script Editor and type cmd-V (Paste). The macro will open in an ImageJ macro editor window (named “Clipboard”) that has a Debug menu. On Linux and Windows, use the control key instead for keyboard shortcuts.
A2 (Johannes): I tried to integrate the debug mode of ImageJ 1.x’ macro language into the broader context of ImageJ2’s script editor (and more broadly even, into the context of SciJava scripting). The big road block is the fact that ImageJ 1.x’ macro language interpreter is tightly intertwined with ImageJ 1.x’ text editor:

The macro interpreter requires an ImageJ 1.x text editor to support debugging macros, it cannot accept any other editor. In other words, the debugging support of the macro interpreter is unfortunately too entangled with ImageJ 1.x’ GUI code to make it possible to be used in more advanced GUIs such as the ImageJ2 script editor. I would be delighted if you could do something about that problem, say, by providing a Java interface (maybe call it “ij.macro.DebuggerGUI”) that is used by the macro editor exclusively to interact with the GUI, and that is implemented by ij.plugin.frame.Editor but can be implemented by an adapter for the ImageJ2 script editor just as well? I start to see why it’s not a trivial implementation.

Since that discussion, if I recall correctly, @Wayne did indeed introduce the needed change into ImageJ 1.x. But no one has had time to follow up and enhance the SciJava Script Editor to take advantage of it. It is still a non-trivial project. One reason we have not prioritized it is that you can almost always work around the missing features using judicious print/logging statements in your code. And if you really need a “heavy-lifting” debugger, you can use an IDE.

I have now filed an issue in scijava/script-editor tracking this feature request. If this feature would be extremely helpful to you, let us know in that issue thread.

1 Like

Could you please make a suggestion what ‘integrated development environment’ (IDE) would be usable in Windows 7.

Please see this page for details and suggestions:

1 Like

I think in 2020 the Clipboard workaround does not work anymore, instead of opening ImageJ with debugging mode, it opens an image called “Clipboard”.

Correct, copy and pasting macro code on Fiji window does nothing (Fiji for MacOS)

It works for me. When I copy a macro from the Script Editor and use the Edit>Paste command it creates a “Clipboard” window with a Debug menu that that I can use to debug the macro.

You are right, after closing and reopening Fiji, it now works, apologies.