Getting local variable values in stack traces, in production
rollbar.com
rollbar.com
I can't tell you how many times users have hit strange bugs, and it took me forever to reproduce them in my debugger. Giving them a limited debugger would have saved me countless hours. Remote debugging is not really an option (I'd like something that can be compiled in).
http://stackoverflow.com/questions/7353024/when-an-app-crash...
I got a StackOverflow core dump, of sorts, similar to this:
http://img215.imageshack.us/img215/2886/picturezb.png
Currently I am using an uncaught exception handler based on this:
http://www.cocoawithlove.com/2010/05/handling-unhandled-exce...
But unfortunately it doesn't give very descriptive stack traces, even with debugger symbols turned on in the project settings. I'm really looking for something that shows me a full view of the program's state just like if I was in the debugger. It may be possible to extrapolate from the core dump, but I’m having a hard time figuring it out. This post summarizes how to do it with gdb:
http://stackoverflow.com/questions/5115613/core-dump-file-an...
But I’m thinking a huge opportunity has been lost here. This should be built into IDEs and especially for mobile apps, there should be a standard way of sending core dumps back to the developer when apps crash, especially for ad hoc builds during testing.
Including event aggregation, lib versions, and so on: https://www.getsentry.com/welcome/
Example: https://gist.github.com/albertz/922622
It does not dump all local vars though, only those which appear in the line where the exception happened. And not only local but also global. But also including subfields, like `obj.field`. And it does that in a kind of hacky way, via some embedded simple Python parsing, but it works most of the way just fine.
Can we exclude certain arguments so we don't capture sensitive data?
Excluding sensitive data: yep. This feature uses the same scrub_field list that's used to scrub sensitive data from the request (GET/POST/headers/etc).
Figured it out a few years ago. Sadly requires binary rewriting...