Eclipse plug-in for debugging ArcObjects code

 Intro

Finally ESRI has made Eclipse plug-in for debugging ArcObjects Code. This is great news for java devlopers who uses print line statements.  One of the most important aspect of any tool is debugging.I strongly feel that Mircosoft products brings great developer productivity.  This is also one of  reasons why many huge fans for MS products than java.  Its better late than never, ESRI shown some concern to java developers!. Kudos ESRI 🙂

About the plug-in

One of the most valuable tools that developers have at their disposal is a debugger through which they can step through code one statement at a time and inspect objects in the application. As many of you may already know, Java classes in the ArcObjects API are really only proxies to underlying COM ArcObjects. As a result, examining these proxies in the debugger only reveals their internal details and not the state of the ArcObjects. This makes it difficult to find out information such as the coordinates of a geometry, or the layers in a map service. Consequently, developers have to sprinkle their code with System.out.printlns and analyze traces on the console to get this information. This approach can be inconvenient and time consuming.

With this new Eclipse plug-in, Java developers can examine the state of the underlying ArcObjects right in Eclipse IDE’s Debug Perspective by enabling the “Show Logical Structure” option on the Expression and Variables window. Here’s an example of a Point object without the “Show Logical Structure” option enabled.

untitled.jpg

This information provides little insight into the underlying ArcObject and is not helpful in reasoning through a workflow while debugging. Now here’s the logical representation of the same object with the “Show Logical Structure” option enabled.

untitled1.jpg

The logical representation presents more comprehensible information about the underlying ArcObject’s state. This state is defined by the no-argument getter methods on it. You might sometimes see exception messages like “Exception Occurred: com.sun.jdi.InvocationException occurred invoking method” in the logical representation. This is normal and happens when some property of the ArcObject is not valid in the current context of the application.

The underlying ArcObjects could be running remotely in a separate process as in the case of ArcGIS Server web applications, or in the same process like in ArcGIS Engine applications. Thus, both Engine and Server developers can take advantage of this plug-in to debug their applications.

How to get the plug-in

Follow these steps to download and install the plug-in from the EDN Website:

  1. In the Eclipse workbench, go to Help > Software Updates > Find and Install
  2. Select Search for new features to install, and click Next
  3. Create a New Remote Site for the URL “http://downloads.esri.com/EDN/java/plugins/eclipse”
  4. Enable this remote site and click Finish.
  5. Expand the EDN tree in Search Results, and select the ArcGIS Debug feature.
  6. Proceed to install the plug-in, and restart the workbench when prompted.
Advertisements

Tags: , , ,

3 Responses to “Eclipse plug-in for debugging ArcObjects code”

  1. Hamid Says:

    it’s good. Remain in this line.

  2. David Kulpanowski Says:

    Hi:

    Your discussion of this topic is one of the few I have found on the web. I have followed your directions but unfortunately have encountered a few stumbling blocks. I receive the following error messages when I attempt to download the ArcGIS Debug, Doc, engine and Samples. When I click the Install buttons it says it “Cannot complete the request. See the details”. The dialog box gives the details:

    the software items you selected may not be valid with your current installation. Do you want to open the wizard anyway to review the selection?

    Cannot complete the request. See the details.
    Unsatisfied dependency: [com.esri.arcgis.engine.feature.group 9.2.0.1324] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ve.java.core/0.0.0
    Unsatisfied dependency: [com.esri.arcgis.engine.feature.group 9.2.0.1324] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ve.feature.group/[1.1.0,2.0.0)
    Unsatisfied dependency: [com.esri.arcgis.engine.feature.group 9.2.0.1324] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ve.java.core/0.0.0
    Unsatisfied dependency: [com.esri.arcgis.engine.feature.group 9.2.0.1324] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ve.feature.group/[1.1.0,2.0.0)

    How can I fix this?
    I posted this question at: http://forums.esri.com/Thread.asp?c=159&f=2267&t=282026&mc=0
    but no one has gotten back to me.
    I am learning java and I hope to do work with ArcObjects because it involves two things I enjoy learning: Java and GIS.

    thanks,
    David

  3. Kiran Says:

    Hi Buddy,
    I am trying to install arcgis server plug in for eclipse (helios) and was following your step 3.Creating a New Remote Site for the URL “http://downloads.esri.com/EDN/java/plugins/eclipse”
    But using this url it is giving arcgis server 9.2 options. Can you please let me know if there is any new url for arcgis server 10 plugin. I shall be very thankful for your help. Can you please help me out. thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: