Select to view content in your preferred language

Debug SOE for Silverlight client?

802
3
08-23-2012 01:22 AM
SanajyJadhav
Deactivated User
Hello,

I am building my first SOE to be consumed in our Silverlight application.

I have written sample SOE code, registered the DLL on the SOC machine and registered it with Server. I enabled this SOE on my test map service and I see it in REST.It works fine as well thru REST.So far so good.

No, I want to be able to debug my SOE since it will contain complex code as the time passes. I followed the steps on this help page to debug it. I could attach the SOC process on our ArcGIS Server in Visual Studio 2010. My development machine is off-course different than server machine.

However, when I give a call to SOE operation, its not hitting my break point. Below is the code I am using to call the SOE.
   private void Button_Click(object sender, RoutedEventArgs e)
        {
            WebClient client = new WebClient();
 client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
            string soeURL = "http://10.25.3.130/ArcGIS/rest/services/Goa/SOE_RnD/MapServer/exts/TestRESTSOE/sampleOperation?LayerName=DT&FieldName=DtCode&f=pjson";
            client.OpenReadAsync(new Uri(soeURL));  
        }


I tried a lot to debug but no luck. It might be the case that I am missing some thing simple. I have put break points at many code sections in the SOE, so its not missing the break point.

Any help is appreciated.

Thanks.
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
When you attach the ArcSOC process to your debugger do you see your SOE dll with 'Symbol Loaded' message? Can you also check the path of your dll?

Your problem might be either because you didn't attach to the right process or because ArcSOC doesn't load the dll you expect to debug. You have to register your debug dll with /codebase option.
0 Kudos
SanajyJadhav
Deactivated User
Dominique,

Thanks for getting back to me.

#1. Yes, when I attach the ArcSoC.exe process, I do not see the error saying that "No Symbols have been loaded".That means I guess, Symbols have been properly loaded. Please see the attached screens shot.You would see that I have 2 ArcSOC.exe processes out of which the one with title "Managed x86" is for my SOE. I have attached both of the SOEs. Even when I attach only my SOC process,breakpoint is not hit.

#2. I have registered my DLL with /codebase option only. and I have kept my DLL in the folder where my MXDs for the map services are saved.That means DLL is accessible to the SOC process.

Still I can't debug by SOE.So,I am finding it very hard to fix its issues.

Thanks.
0 Kudos
SanajyJadhav
Deactivated User
Dominique,

I got it working. After reading your post I started to dig the issue down this afternoon again and succeeded to debug it.

The only issue is, when I debug 3-4 times, I have to restart the concerned map service, clear the REST cache.Then,I can debug again, apart from this, everything is great. And I have noted that SOE performance is amazing, it fetches 41116 unique values of the requested field in a second or so.Thanks a lot.

Cheers.
0 Kudos