A C# code retrieves a property value from a C++ dll and this retrieval blocks the current thread until the dll returns the value. In debug mode, when the retrieval takes a long time, the MDA throws a ContextDeadlockSwitch.
I suppose it's not possible to catch ContextDeadlockSwitch at runtime, but is there a way that the a mechanism similar to MDA can throw a similar exception that C# can catch to detect this deadlock?
The reason is to let C# code prompt to the user to either continue waiting a few seconds more or forcibly kill and restart the app.