Friday, May 25, 2018

Remote debug environment setup for ArcGIS server extensions- SOE and SOI

In order to debug the ArcGIS server extension SOE/SOI from your development machine, you have to follow 3 steps:

           1.       Enable remote debug ( Presumption is your development machine and GIS server are different machines)
           2.       Enable sever extension for debug
           3.       Attach debugger to the process running the service

Download and install the remote debuggin tools from - https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging 

      A.  Enable remote debug
1.       Download and configure Remote tools on the development
a.       Find msvsmon.exe in the directory matching your version of Visual Studio. For Visual Studio 2015:

Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe
(x64 can debug both x86 and x64 but x86 can only debugs x86)

2.       On the remote computer,  copy Remote Debugger folder from development machine and put in C:\ drive. Then, run msvsmon.exe
3.       The msvsmon.exe output terminal shows

           B. Extension debug workflow
a.       Stop the service that will uses extension from ArcGIS Manager
b.      Deploy your extension
c.       Enable debugging of extensions
d.      Start the service
e.      Find the ArcSOC.exe Process ID (PID) that is associated with service ( you can find it from Task Manager)

       C.  Attach process from Visual studio
a.       Debug รจ Attach to Process
b.      Get you remote machine ID and port number from msvsmon.exe output terminal ( step #A.2)

c.       Select the ArcSoc PID and attach it.
d.      Set a breakpoint, if your breakpoint is in the extension initialization code, the breakpoint will be hit as service starts . Otherwise , the breakpoint will hit when extension is used.
e.      Then, debug happily.


References


.NET , ArcGIS Server , C# , SOE/SOI

1 comment :

  1. I am getting 'breakpoint will not currently be hit no symbols loaded for this document vs2015'

    ReplyDelete

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me