For years now lldb has been unable to print Alamofire's
*Response type in completion handlers, even when other values in other completion handlers are okay. Naturally this makes debugging while developing Alamofire quite frustrating. I'd like some help narrowing down the cause so I can either make a better bug report to get it fixed or look into fixing it myself.
The issues is trivially reproducible. Clone Alamofire, place a break point in a completion handler of one of our tests, and run the test. Attempting to print the response will produce this error:
error: Couldn't materialize: can't get size of type error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression
Of course I can
frame variable or
ex debugPrint(response) to see the value, but this affects both
po and the variable view, so it would be much more convenient to actually be able to print.
I've tried all of the workaround I could find online, including:
- Ensuring optimizations are turned off.
- Turning optimizations on just to see.
- Setting the Debug Information Format to DWARF or DWARF with dSYM file.
- Toggling various combinations of sanitizers and other settings in the scheme.
Nothing has made any difference, so what are my next steps to try and debug this?