[Q] Retrieving crash-dump from Windows Phone 8

Search This thread

szt69

New member
May 17, 2014
4
0
Umdloti
(I am new and cannot post in dev forum, that's why I posted this here. Still hope someone will be able to help.)

Is there a way to get crash-dumps out of Windows Phone 8 during development time? I am after a file that is dumped similarly to when a normal Win32 app crashes. Or similar to what is saved on iOS devices at crash to be investigated at a later point.

My question is specifically about somehow retrieving this (or similar) file/info from the phone after a crash without me having to do anything in my code e.g. manually writing the stack trace to a file from an unhandled exception.

I am aware the option of getting "live" crash reports from a beta-submitted app but that is not what I am after.

Thanks!
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Can Visual Studio's debugger generate crash dumps? I'd expect so (I know windbg can, but I haven't managed to attach windbg to a phone app) and that would be the obvious approach.

Not sure why you want a dump when you can do live debugging, though...
 

szt69

New member
May 17, 2014
4
0
Umdloti
Can Visual Studio's debugger generate crash dumps? I'd expect so (I know windbg can, but I haven't managed to attach windbg to a phone app) and that would be the obvious approach.

Not sure why you want a dump when you can do live debugging, though...

Hmmm, I never thought of using windbg because that never came up as a tool that is used with WP8.. Will give it a try and see if I get anywhere.

I need a crash dump because the crash does not happen when a debugger is attached.

I am trying other options to catch the issue: isolating the code the crash might happen, dump the stack trace into a log file, but a crash log would be the most obvious place to look at and I am shocked that it is not possible or at least this hard.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
There's a way on the ATIV S to get crash dumps (without even crazy hacks, I mean; it's a hidden option in the Diagnosis application) but I think they're only for the OS, not for individual apps.

A crash that only happens without the debugger attached is a very irritating sort of crash!
 

szt69

New member
May 17, 2014
4
0
Umdloti
There's a way on the ATIV S to get crash dumps (without even crazy hacks, I mean; it's a hidden option in the Diagnosis application) but I think they're only for the OS, not for individual apps.

A crash that only happens without the debugger attached is a very irritating sort of crash!

Amazing, I have access to an Ativ S device so will give a try! Thanks!
 

szt69

New member
May 17, 2014
4
0
Umdloti
I have got a confirmation directly from Windows Phone team: what I am asking for is not possible at the moment.

I have provided them feedback on what kind of situation this can put some developers, I hope they will consider it and look into doing something about it.

In the meantime your options are to manually dump the stack trace (along with any info you want) from an unhandled exception or to upload your app for beta testing and check the crashlogs on the dashboard of your developer account.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Yeah, sorry. I should have mentioned that my approach is to always implement a custom unhandled exception function (there's a stub for it in App.xaml.cs) and either present an error message or write an error file. It's not a true crash dump, but it's often enough to help you find the spot where the problem occurred.

Hmm... I wonder how hard it would be to write a native component that would generate a crash dump on demand. I mean, it *should* be possible to do it, since you have raw pointer access and file I/O. I've just never tried.