QuickLook vs Debugger Area (the ***** kid brother)

I am working with a massive Electronic Medical Record (EMR) system, the largest in the world. It is also the oldest, most cantankerous one in existance. It also represents a very large "big data" source (albeit smaller than NSA's recording of US citizens telephone calls). In other words, old + big = unruly.


Xcode's "debug area", which for all intents and purposes is a debug variables window smashed on to the bottom of the editor, is critical to working this EMR. After several machination while relearning my craft, as a side effect of something else, I figured out how to get the "debug area" to act like a traditional "debug variables window" and to open up reliablity as if it were a function of the system instead of manually setting it up every time.... by having a "Debug Variables.h" file with every project.

Debug Variables Setup

https://www.evernote.com/l/ACAeVshxqZNL9LJVHWx-SFnEvWJwNnVPheEB/image.png

(why can't we display pictures now?, seems like a downgrade...)


But in wrestling with the debugger, it has become clear that the 'debug area' is significantly less immediately capable than the nimble yet cumbersome "QuickLook". For example, in dealing with NSData typed variables.


When you put something into NSData, it goes largely into a black hole as far as debugging is concerned. The best you can hope for is to use QuickLook and the eyeball button to display the contents in a memory dump with ascii to the side. By contrast, this is not available in the Debugger Area, why?


Contrast of Debug Area vs QuickLook in diving into NSData

https://www.evernote.com/l/ACAaLFrw3VJEGINKwn-OyDCLwGsonk7MEAYB/image.png


(sorry for the links, this silly system can't display images)


Long story short, unless I am missing something, it seems I have to keep data out of black hole containers like NSData for as long as possible in my code in order to see the contents of what eventually goes into NSData. For for that matter, brown hole containers like NSMutableURLRequest where you can't disclose the contents without setting up a plethora of "Expressions". The lack of true variable display in the "Debug Area" discourages use of these sorts of data types in the base code and encourges use for only when lobbing data into Apple's Cocoa classes.


There is no reason why, for anything that acts like an instance variable, that flipping the disclosure triangle open on it can't display its value... just like a user expression. As it is, the Debugger Area and debugger variable handling in general is very disapointing, even in contrast to functions already implemented in QuickLook on variables. (not to mention the autistic activation of QuickLook).


Contrast NSMutableURLRequest's debug area view vs manual expressions

https://www.evernote.com/l/ACCNWm4wKIpD2J_ObSrEcg5jDsPn5WeYQ2kB/image.png

Replies

The view you're getting in the Quick Look is the "View Memory of ___" view which Xcode has had for a while, but it's very hidden. Use the contextual menu on that NSData entry in the variables view to view either the memory around the variable you have selected, or the memory inside it. The * indicates whether it dereferences the address.


I'm not sure if that entirely answers your question, because this pulls up the memory in the editor area. You can hold option to put it in the assistant, and leave your source code in the primary but the quick look is indeed faster and more lightweight.


The info shown for arrays and other things are custom formatters. Modern ones are written in Python, and there's a lot of great info in the WWDC LLDB sessions in the past couple years. Here is the synopsis: http://lldb.llvm.org/varformats.html

Any progress on this? this is a basic feature of a debugger, please let us know!!