First I enabled saving of dump files on a Windows 10 Mobile phone:
Settings > Update & Security > For developers > Save this many crash dumps: 3
Then I debugged an app which throwed an exception. I continued the debugging after stop. After disconnecting and connecting the mobile phone again, I was able to access the dump file stored under Windows phone\Phone\Documents\Debug
directory. The file is called
FPCL.WIndows - a736c773-c105-4b30-a799-4bf317872f5e with exception C000027B on 5-03-2016 12.11.dmp
and has about 140 MB!
I copied the file to the bin
directory of my UWP app. Afterwards I opened it as file in Visual Studio 2015 (in the same project). Now I can see the Dump Summary and I have the following buttons:
- Debug with Managed Only
- Debug with Mixed
- Debug with Native Only
- Set symbol paths
- Copy all to clipboard
If I run Debug with Managed Only I get
A fatal exception was caught by the runtime. See $stowedexception in the Watch window to view the original exception information.
and on clicking Break I get
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).
In the Watch 1 window I see the following
Name: {CLR}$stowedexception
Value: {"The method or operation is not implemented."}
Type: System.NotImplementedException
This should be the exception I have thrown in my app. When I open this node and look under StackTrace I can get a line number. On pressing Continue I get
The debugger cannot continue running the process. This operation is not supported when debugging dump files.
So I can only stop it.
If I run Debug with Mixed I get again
A fatal exception was caught by the runtime. See $stowedexception in the Watch window to view the original exception information.
and on clicking Break I get
kernelbase.pdb not loaded kernelbase.pdb contains the debug information required to find the source for the module KERNELBASE.dll Module Information: Version: 10.0.10586.218 (th2_release.160401-1800) Original Location: KERNELBASE.dll Try one of the following options: Change existing PDB and binary search paths and retry: Microsoft Symbol Servers
Here I can either press Load or New. So the kernelbase.pdb isn't found under the given location. Should it exists? Where should I find it?
In the Watch 1 window I see the same as above and I can only stop it.
If I run Debug with Native Only I get
Unhandled exception at 0x76ECDF95 (combase.dll) in FPCL.WIndows - f736c883-f105-4d30-a719-4bf328872f5e with exception C000027B on 5-03-2016 12.11.dmp: 0xC000027B: Anwendungsinterne Ausnahme (parameters: 0x075C6838, 0x00000002).
and on clicking Break I get the same missing kernelbase error as above, but here in the Watch 1 window the Value is Unable to evaluate the expression
. So I can only stop it.
According to this post I should be able to inspect the source code and find the cause. But how is such a UWP dump file inspected correctly?