I have been working on getting my SOE running in 10.1 on Windows 8 using Visual Studio 2012.
One of the things that I have found very helpful is to have the following code in my SOE constructor:
// If we are running with the code compiled using the Debug configuration then launch the debugger.
// Comment this line out if you do not wish to debug within the context of the SOC process. The
// best way to do this is to configure the map service to only launch a single instance.
#if DEBUG
Debugger.Launch();
#endif
This has worked well for me on Windows 7 and XP. When this code is invoked then the Visual Studio Just-In-Time debugging dialog is displayed which allows you to, or not to, start debugging at the line of code which called Launch. Unfortunately, this does not work in Windows 8.
I spent some time debugging this and finally worked it out with Microsoft support. I share the solution with all of you here as a community service. All I ask in return is that if this helps you then mark this post as helpful.
The secret lies in changing the registry key for the Visual Studio JIT debugger via the following:
reg add "HKCR\AppID\{E62A7A31-6025-408E-87F6-81AEB0DC9347}" /v AppIDFlags /t REG_DWORD /d 8 /f
Before making this change the value on my machine was 0x28. The above changes it to 0x8. In essence it removes the 0x20 flag.
If you search the Microsoft include files (WTypesbase.h) then you find the following:
#define APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY 0x20
Once you make this change then the JIT debugging window is displayed again. I believe that all of this relates to various session 0 security changes made by Microsoft.
Happy debugging!