Debuggers Matter

There’s a lot of arguing about Objective C versus Swift. The IDE is a huge catch-all pattern for the problem of “making programming easier”, incorporating many little (code completion, auto-indentation) and huge (visual GUI design) technologies. These can make or break language adoption.

The debugging experience matters tremendously. Microsoft Visual Studio coupled with .NET, where I do most of my development, has a fabulous debugger. The causes of errors are rapidly discovered. They’d be correctable on the fly too if MSFT could solve the inability of 64-bits apps to be edited on the fly like 32-bit apps. WTF, MSFT? I see my app’s exceptions, types, and objects. I don’t see machine registers and traps, or disassemblies of code that’s not part of my app; stack traces elide code not in my app. On Xcode, I see registers, low-level traps which have little concept of what objects or types in my program could have caused the error. It made learning Objective C in the 00’s impossible. Visual Studio made learning C# and .NET very easy. My GUI apps were pretty crappy (Forms and WPF are pretty badly designed) but they worked and I got them working fast.

I suspect the table-driven nature of the UI frameworks leads to this problem. Very little of my code is on the stack, if any. But my data is all over the place. If I set and outlet wrong, a keypath is invalid, whatever, it becomes a nightmare to know what the wrong value was, and  the context it came from. I’d want suggestions as to what would be valid (a list of possible keys, for instance).

So: make the debugger aware of my programming constructs and environment. Focus me on my world, not yours, Apple Languages folks. The Swift playground is an interesting curiosity, and points out a few of the techniques and technologies needed for a great debugger. Talk to Windows developers and see what enables them to write code rapidly and debug it less painfully. Talk to experienced developers having trouble with Xcode and fix those issues. Kudos to all the folks who did figure Xcode and Objective C out, but Ive seen better and demand better.

Swift, whatever its faults, is making iOS programming more approachable for me, despite Xcode.

Updated June 2, 2016

I just spotted that when at a breakpoint I can hover the mouse pointer over a variable and a popup will show the value.