When debugging my Android app in VS2015, the debugger often stalls indefinitely. If I “pause” the debugger, it always take me to a line where I have a call to Android’s
getResources().getIdentifier(). Occasionally the debugger simply refuses to run, displaying the following error: “No Compatible Code Running. The selected debug engine does not support any code executing on the current thread (e.g. only native runtime code is executing).”
A Google search led me to this VS forum thread: https://developercommunity.visualstudio.com/content/problem/70880/no-compatible-code-running-the-selected-debug-engi.html
The MS reply says, “We have determined that this issue is not a bug. That error happens when you are debugging managed code, but there is an error that occurs in native code and only native code is on the callstack” and provides this link:
Since the debugger always appears to stall on the request for an Android resource it makes sense that this could be what’s going on for me too. (I should note that the debugger was running fine for me for a while even with the Android resource call - it does not seem to be a consistent problem, but it is currently a problem about 90% of the time for me right now, making debugging impossible.)
It looks like for C++, C#, and VB there is a “Debug” tab in project settings with an option for debugging mixed/native code that can be used to address the issue, but there is no Debug tab in the Oxygene project settings.