I have a C# project that was initially created by VS2013. I open it in Xamarin and it builds fine, the executable file is created and can be started from outside Xamarin.
But if I try to start it with Run->Start Debugging, it shows this error:
Debugger operation failed The request is not supported. (Exception from HRESULT: 0x80070032)
The only similar question I found was for F# - Debugging F# in Xamarin Studio 4.0.3 throws an error, and they suggest it is because the project is 64-bit, but I'm not sure if this applies to C# as well.
How can I fix this error?
It really did turn out to be because of the architecture. But in my case the architecture was AnyCPU, not x64, and it couldn't be changed from inside Xamarin:
So instead I opened the .csproj file in Notepad++ and used Replace All to replace all mentions of "AnyCPU" to "x86". After reloading the solution in Xamarin, the debugger now works.
If you arrive here as a result of trying to debug a unit test in Xamarin (in my case on a Mac) and you see the Debugger Operation Failed message, it may be because in the drop-down for your chosen build (on the header bar area) you still have release selected. I switched that to debug, and then the option in the unit tests to 'debug test' worked.
User contributions licensed under CC BY-SA 3.0