Debugging ImageJ

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

Debugging ImageJ

chris elliott
Hi, I have looked at the tutorials for building ij and think that the  
tutorial at at http://rsb.info.nih.gov/ij/developer/NBTutorial.html 
reflects an older netbeans.

I have had success with netbeans 6.5; I downloaded the source to my mac,
chose File | new project and chose Java with existing source
renamed the build folder to oldbuild
removed lines from build.xml about plugins & macadapter (as at http://rsb.info.nih.gov/ij/developer/NBTutorial.html)
then I did File | Project properties (ij) and in the libraries tab  
added ij.jar to both compile and run parts

Now I can build it and run it with the ant script (right click on  
build.xml and choose run or run2) in Netbeans. Or I can use the Run |  
Run main project and Debug | Debug main project commands. The debugger  
will now stop on a breakpoint, but not trace into the source code or  
show me where the execution point is



In the commandline debugger, I don't get a break at all
$ jdb -classpath ij.jar ij.ImageJ
Initializing jdb ...
 > stop in ImageJ.showStatus
Deferring breakpoint ImageJ.showStatus.
It will be set after the class is loaded.
 > run

and the imagej program starts up happily

any help much appreciated
chris
Reply | Threaded
Open this post in threaded view
|

Re: Debugging ImageJ with Netbeans

Christopher Coulon-2
This is what I discovered is the set up procedure for ImageJ using Netbeans
6.5 (this was done on an Intel Mac).

Chris Coulon



1.    Create a folder for your project

2.    Download the latest ImageJ source code, unzip, and place the resulting
source folder in your project folder.

3.    Run Netbeans and do File>New Project

4.    Select Java Project with Existing Sources and hit Next

5.    Name your project and hit Browse at the Project Folder and go to the
source folder you just put in the project folder.

6.    Click Next once to get to the Existing Sources window.

7.    Click Add Folder and navigate to the source folder and ij folder
within. Select the ij folder and click on open.

8.    Click Add Folder and navigate to the source folder and plugins folder
within. Select the plugins folder and click on open.

9.    Select the Files tab in the left Netbeans window and double-click the
build.xml file to open it in the main window.

10. Delete, or comment, line 12 (<exclude name="plugins/**" />) in
source/build.xml.

11. Go to the Build>Build Main Project (Ignore the red error messages in the
ImageJ build output.)

12. Right-click the project name in the Projects window on the left of the
Netbeans window. Select the Properties at the bottom of the list.

13. Select Libraries in the Categories window, and in both the Compile and
Run areas click Add JAR/Folder button and choose ImageJ/ij/jar and hit OK.

Now you can write plugins by right-clicking the plugins folder in the
Projects list and selecting New>Java Class...

Run or debug using the icons or the run menu.


       

The GAIA Group
 Global Automated Image Analysis

We help Researchers help themselves!
Find out about Online Tutoring for ImageJ

Christopher Coulon, Ph.D., Founder
http://gaiag.net
[hidden email]