I have a managed project (.net 4.6.2) which calls into a native dll. If I put a breakpoint in the native code, it hits it, but if I try to inspect stack variables I get a rather annoying
Inspection of unmanaged type 'MyTypeInHere*' requires unmanaged debugging to be enabled. Please set the debugger type to 'Mixed' and try again
I followed steps from https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-debug-managed-and-native-code?view=vs-2019, Debugging unmanaged code while debugging managed code but I still cannot inspect types.
In the managed project properties, under debug I've enabled enable native code debugging
and under the build page I've checked allow unsafe code
. Further in launchSettings.json, I have "nativeDebugging": true
Also note that in the native project property settings I've set the Debugger type to mixed
.
Does anybody know what's preventing me debugging native code?
Thanks