In January, while still at Shopify, I released the Super Debugger for iOS, a wireless, interactive, and realtime debugger for iOS applications. That means you can debug your applications over wifi (and potentially, cellular), without needing to set breakpoints. You can send messages to your objects, you can see their state, and you can change their state all in real time. The project is open sourced on Github, too.
From the project’s homepage:
The Super Debugger (superdb) lets you debug in new ways lldb can’t: it allows you to send messages to the objects in your app, without the need to stop on breakpoints.
Use the powerful Shell on your Mac to inspect your objects, see changes instantly, and speed up development.
The project started as an internal “Hack Days” project at Shopify, where we got two days to start and “ship” (or at least demo) a project. As I’m a Cocoa developer, I had been thinking of ways to make development easier, and superdb was the result.
The Super Debugger builds upon F-Script, a Mac project by Philippe Mougin. F-Script has been around for probably close to a decade now, and it works as an object browser for Cocoa objects. Philippe refers to it as “a Finder for your objects”, which I think is a great description. It’s a programming environment with a Smalltalk-like syntax where objects can be inspected and messaged.
The project itself doesn’t appear to be maintained very much anymore and it was Mac only until Github user “pablomarx” got a version of it running for iOS. Even though the iOS code had rotted since pablomarx had ported it, it was still a great accomplishment, but it was more of a proof-of-concept than anything else. The testbed was an iOS application with a text field and an output log. It showed that it worked, but it wasn’t exactly useful.
The technology had been around for a while, and yet nothing useful was coming of it. I thought about it for a while and decided my Hack Days project was going to make use of this technology.
So I started by modernizing the iOS port of F-Script, wrapped it up in a network service, used some Bonjour magic to find running instances of it on a local network, wrote a socket protocol between the F-Script interpreter and a Mac app, wrote a command shell for the Mac app and presto, the Super Debugger was born.
Even though it might sound like a lot, the real meat of the operation took only those two days at Shopify. The technology had existed for years and yet all it took was a couple of days to make something tremendously useful out of it. It might sound kind of self-congratulatory, and it is as I’m very proud of what I’ve made, but my point is sometimes wonderful things are hidden under the word “just”. Sometimes there are brand new avenues we’d never even considered and all that was missing was the tiniest of pieces.
The bigger moral of the story is just because what you’re adding to something doesn’t seem like much, or isn’t difficult to create, doesn’t mean it can’t have a profound impact on what you’re making. Slapping a network layer on an interpreter someone else wrote and adding a few stolen interaction tricks may sound like cheating, but it’s thinking like this we desperately need more of in this world.