Skip To Content

Debug an extension

Debugging an extension (SOE or SOI) poses certain challenges, because you must step into a running service process. ArcGIS Server Manager provides several settings that can help you debug Java extensions. These settings are described in more detail below. You can only debug .NET extensions with the Visual Studio debugger; no Server Manager debugging tool exists for .NET extensions.

The ArcGIS Enterprise SDK documentation provides detailed help for debugging Java and .NET extensions.

Debugging workflow

To debug your extension, you need to do the following:

  1. Use ArcGIS Server Manager to deploy your extension.
  2. Use Server Manager to enable debugging on your extension and configure debugging settings. These are described in more detail below.
  3. Set breakpoints at the desired locations in your extension code.
  4. Stop and then start the service.
  5. Immediately attach your debugger to the operating system process running the service. If your breakpoint is in the extension initialization code, the breakpoint will be hit as the service starts. Otherwise, the breakpoint will be hit when you use the extension.
  6. Use Server Manager to disable debugging.

Configuring debugging settings in Server Manager

To facilitate debugging, ArcGIS Server Manager allows you to alter extension behavior. You can suspend the service startup so that you can attach your debugger to the service process before the extension initialization methods are called. You can also specify a range of ports that will be used when debugging the service.

To access these debugging settings in Server Manager, follow these steps:

  1. Sign in to ArcGIS Server Manager and click Site.
  2. Click GIS Server > Extensions.
  3. Click Debug Settings and check Enable debugging of extensions. This enables the other options on the dialog box.
  4. Optionally, check Suspend service startup and specify the number of seconds that the service startup should be delayed.

    Some extension code only runs one time, when the service starts. This code is typically placed in the Construct method of the IObjectConstruct interface. Suspending the service startup gives you time to attach your debugger to the service process before the Construct method runs, thereby allowing you to hit any breakpoints you have set in that method's code.

  5. Optionally, specify a range of ports to be used when debugging.
  6. Click Save.

Now you can debug your extension by stopping and then starting the service and attaching your debugger to the operating system process running your service. If you set a time window for suspending service startup, you need to attach your debugger to the service process before this window is reached; otherwise, you will not hit any breakpoints in the extension's Construct method.

You can stop and start the service as many times as needed during the debugging process.


When you have finished debugging your extension, return to the debug settings and uncheck Enable debugging of extensions. If you do not do this and you had configured your settings to suspend the service startup, you will experience a delay each time you try to start your service.