Introduction
This tutorial show how to debug the WPS Client for ArcGIS.
Content
Set up ArcGIS
Run C:\Program Files (x86)\ArcGIS\Desktop10.7\bin\JavaConfigTool.exe as administrator. The path may vary on your system.
Check "Enable Debugging of Java extensions from an IDE (e.g., Eclipse)".
Click "OK" to close the dialog.
Set up the IDE
We are using Eclipse for this tutorial. Download it from here:
https://www.eclipse.org/downloads/packages/. We use the Eclipse IDE for Enterprise Java Developers for this tutorial.
Download/clone the WPS Client for ArcGIS from GitHub:
https://github.com/52North/wpsclient4arcgis
Start eclipse. Choose or create a workspace.
Now import the WPS Client for ArcGIS Maven project.
Start either from here:
Or use the menu
This will lead you to the import dialog. Choose "Maven" -> "Existing Maven Projects" and click "Next"
Now browse to the folder containing the WPS Client for ArcGIS, you should see the following:
Click "Finish" to start the import process. Click "Finish" again when the dialog below shows up and click "OK" in the confirmation dialog.
Now the project will be imported into the workspace. You should see something like the following:
Debug the client
Start ArcMap.
in Eclipse, set a breakpoint in the class ArcMapWPSClientDialog.java in the module wps-arcmap-client-extension, e.g. in line 449:
Now open the "Run" menu and click on "Debug Configurations":
Double click on "Remote Java application". There should be default values used for "Name" and "Project". Otherwise select a name and browse to the wps-arcmap-client-extension project.
Important: Change the Port to 8013! (This needs to be the same port ad in the JavaConfigTool).
Click "Debug" to start debugging. You can ignore the following warning for now (i.e. click "Proceed"):
In ArcMap, click on "Add WPS Server" and connect to a WPS.
In Eclipse, you should now be prompted to switch to the debug perspective, as the breakpoint was hit.
Click "Switch". You now should see something like the following:
Now you are able to debug the WPS Client for ArcGIS.