inspect array contents in debugger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

inspect array contents in debugger

Neil Fazel
Is there a way to inspect an array's contents in the ImageJ macro debugger?

Thanks,
Neil

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: inspect array contents in debugger

vischer
Hi Wayne and Neil,
this is a suggestion to implement the "Array Inspector":
Clicking  on any array in the Debug window (here: "firstArr") will show its elements in a separate window, which is updated as long  as the array is alive.
I include three files ( showing 3 rather small changes marked with //n__) to get this implemented into ImageJ, plus  the test macro shown.

best regards, Norbert







https://www.dropbox.com/s/9a7bb9jhi525vsl/Array_Inspector.zip

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

PastedGraphic-1.png (90K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: inspect array contents in debugger

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Neil Fazel
On Sep 20, 2013, at 12:37 PM, Neil Fazel wrote:

> Is there a way to inspect an array's contents in the ImageJ macro debugger?

Thanks to Norbert Vischer, the macro debugger in the latest ImageJ daily build (1.48d7) includes an "Array Inspector" window. Here is a test macro:

   aa = 55;
   bb = 66;
   firstArr = newArray(1.33,2.44,5.66,"Hello");
   ee = 88;
   firstArr[2] = 77;
   Array.invert(firstArr);
   ff = 99;
   secondArr = newArray(33,1,55,7,123,5,-9);
   secondArr[0] = 66;
   Array.sort(secondArr);
   xx = 2;

Type cntrl+d (Debug>Debug Macro) to start debugging and cntrl+e (Debug>Step) to run the next statement in the macro. In the "Debug" window, click on "firstArr" or "secondArr" to open the Array Inspector. On Macs, use the command key instead of the control key.

-wayne

[cid:[hidden email]]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

ArrayInspector.png (63K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: inspect array contents in debugger

Neil Fazel
In reply to this post by Neil Fazel
Thank you, Norbert and Wayne. This will be a very useful addition to the macro debugger.

Neil

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html