Objective
After we released our app, the error report mechanism of Windows phone helps us to collect the crash information of the program and send it to Microsoft's server, which can help the developers to improve the stability of the app.
So how do you use these dump file? First we need to download these dump file from the Microsoft Developer website, and then use the Debug tool for analysis, we choose WinDbg here. Download steps
1. Login Http://dev.windows.com/en-us/dashboard
2. Select Windows Phone Store
3. Enter reports, select Crash Count, select app and date, dot product refresh button
4. Click Export Stack traces, which includes the last 30 days of crash dump records
5. After developing the downloaded Excel file, this Excel file contains 9 columns. Are the app's name, the app's Id,app version number, the operating system version number, the problem function, the exception type, the number of crashes accumulated in 30 days, the stack's backtracking and dump File.
6. We can quickly see through the columns E and F, whether it is caused by our app crashes, and then click Download dump file for analysis.
Use WinDbg to open dump file
1. Download windbg from Microsoft's website:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063 (v=vs.85). aspx
2. Run WinDbg, select Open crash file from the Files menu, or use the shortcut key ctrl+d.
3. Set the symbol server,
A. You can use the shortcut key CTRL + S:
B. or command the ". Sympath" command:
. Sympath Srv*e:\bclcache*http://msdl.microsoft.com/download/symbols
C. ". Symfix" can also be used
4. After you finish specifying symbol server, we need to reload the symbol file and enter ". Reload" in the command window. The command window can be positioned using the shortcut key alt+1.
5. Load the SOS module. SOS.dll is an extended command module written by WinDbg in order to debug managed code. The latest WinDbg will automatically load this module.
6. See if the version of SOS is loaded correctly. We first look at the version number of the Coreclr.dll, and then compare the version numbers of the SOS.dll that are currently loaded.
A. Enter "LMV mcoreclr" in the command window. Command LMV is the information that prints out the module, the m+ module name is used to specify the module to be printed, here is the information to print the CORECLR module.
B. Enter ". Chain" in the command window. This command is to display the default load order for all loaded debug extension modules.
Compare the version number of the CoreCLR module to the first one in the lookup chain. If it does not match, we can use ". Unload" To remove the already loaded SOS module and use ". Load + path" again to select the correct item in the extension DLL lookup chain. For example:
. Unload e:\bclcache\symbols\sos_x86_ARM_4.0.50829.00.dll\503D5669449000
. Load C:\Debuggers\SOS
. chain again to see if the first match is a summary
Now we know how to download the dump file and how to use WinDbg to open it. In the following article, I'll give some practical examples to explain how to find the wrong code.
Share the code and change the world!
Windows Phone Store App Link:
http://www.windowsphone.com/zh-cn/store/app/Blog Park-UAP/500F08F0-5BE8-4723-AFF9-A397BEEE52FC
Windows Store App Link:
http://apps.microsoft.com/windows/zh-cn/app/c76b99a0-9abd-4a4e-86f0-b29bfcc51059
GitHub Open Source Link:
Https://github.com/MS-UAP/cnblogs-UAP
MSDN Sample Code:
Https://code.msdn.microsoft.com/CNBlogs-Client-Universal-477943ab
Ms-uap
2015/1/12
Dump file analysis for Windows Phone app