As nabble.com 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.