I'm trying to debug something with Core Data really quick, and so I was going to use the Evaluate Code Fragment thingy to execute a fetch. However, when I try to alloc/init the NSFetchRequest, it tells me that there is "no known method 'init'; cast the message send to the method's return type." Is there a trick to instantiating new objects in the Evaluate Expresstion code fragment mode, or can this simply not be done?
Evaluate Code Fragment feature currently doesn't implicitly cast expression to the expected type (while Evaluate Expression does) and you need to to so explicitly, since neither GDB not LLDB can determine the type of the returning object for Objective-C methods calls.
We plan to improve Code Fragment mode in future updates, meanwhile you can either switch to Expression mode, or manually cast each method call to the returning value, e.g. (id)[(id)[NSFetchRequest alloc] init].