Hacker News new | comments | show | ask | jobs | submit login
PonyDebugger: Chrome Developer Tools for Native iOS Apps (squareup.com)
278 points by wlue 1763 days ago | hide | past | web | 44 comments | favorite



I saw a demo of this a couple months ago at a small gathering. I was blown away. Another feature demo'd at the time was the ability to make obj-c calls in the chrome javascript console and have it be interpreted in the app runtime. e.g.

UIApplication.sharedApplication.delegate.navigationController.navigationBar.tintColor = UIColor.redColor;

and the app's navbar changed color. Is this still possible with this release? I haven't been able to try it out at work yet. Thanks for this awesome tool.


Interactive console support is coming. We need to work out a few kinks before it is ready to go


Have you heard of Cycript? It's an open source JavaScript-ObjC bridge, maintained by Jay Freeman, the creator of Cydia. It currently supports this interactive console functionality (with tabbed autocomplete!), by injecting into a specified process.

It would be awesome if you integrated Cycript into this.

http://cycript.org


They apparently seem to be using JSCocoa (which I find kind of a surprising choice in comparison to Cycript, but hey: I'm biased ;P).

(edit:)

Looking into the debugger protocol some, it seems like it might be irritating to integrate Cycript and have it work with Chrome. (The problem being that it parses the JavaScript on the client and sends over an RPC, do you'd have to drop down to objc_msgSend semantics; one of the things I had disliked about JSCocoa then actually makes it easier to use in this environment: how it kind of munges all of the namespaces together into object properties.)

The entire idea of mapping the semantics of a native app into the HTML reality of that debugger, however, is somewhat awkward if you want to attack the parts that aren't networking and database (which is what PonyDebugger is currently nailing really well). I was working on something a little more general a while back as part of Cynoptica (mapping all processes to an HTML debugger interface); when I have something I'll hit you up on IRC.


This looks like a really valuable tool to have in the iOS development arsenal.

It also underscores my loathing for cutesy, irreverent naming conventions.


The name came about because our internal HTTP library is named PonyExpress, and this tool was originally part of it. At least it is google-able, right?


Honestly it's better than another acronym. It's more identifiable and doesn't have other possible meanings.


There's only so many serious business-y names you can give to something like this. Those names are awfully generic. PonyDebugger is great because it's unique, googleable, and memorable.


What would you call it?


iOS Visual Debugger Pro 1.0b


Awesome, will definitely give this a shot. It's great to see iOS development tools pick up tricks from the web world.

Personally, I can't wait for a Firebug-like tool for live debugging and tweaking of UIView hierarchies.


PonyDebugger could be extended to support this very easily. We pretty much codegen "controllers" for all of Chrome Developer Tool prootocols's domain. One could map the UIView hierarchy to the DOM by just implementing a delegate.

You can look at the "*DomainController" classes here for examples: https://github.com/square/PonyDebugger/tree/master/ObjC/Pony...

For implementing DOM-like viewing it would require you to implement PDDOMCommandDelegate defined here: https://github.com/square/PonyDebugger/blob/master/ObjC/Deri...

Docs here: https://developers.google.com/chrome-developer-tools/docs/pr...



Yes, and also DCIntrospect. They're encouraging, but don't currently compare to what you can do with, say, live-editing css or with a Javascript console.

Not that I've used it, but RubyMotion is making progress on a related front. A live REPL, styling apps with CSS, etc. Maybe we're not far off.


The live REPL is provided by Cycript (a program I wrote that lets you inject into running iOS/Mac applications: it has a blend of Objective-C and JavaScript syntax with runtime tab-completion; it is used by most of the people doing extension development for jailbroken devices as it lets you dig deeply into any running program quite quickly).


That already exists in fact: it's called DCIntrospect. https://github.com/domesticcatsoftware/DCIntrospect


It seems that the state iOS development is improving at a very rapid pace. I can't wait to try this out.


Thanks for this! The Core-Data Browser will be especially useful for me. Verifying data was correctly stored had been somewhat of a pain before.


This looks fantastic. Does anyone know if there is a similar tool for Android?


Remote debugging ( Chrome for Android ) has been around for a while : https://developers.google.com/chrome/mobile/docs/debugging


Also, ADB runs over network easily as of ICS using the option in 'Developer options' in the system setting.


Hmmm..For some reason, I cannot seem to find any setting in "Developer Options" on my Jelly Bean based device. Can you tell me what it is called?


That's for webapps, not native applications, is it not?

The point of TFA seems to be that it's using the webkit developer tools to inspect and debug native cocoa applications, not web applications.


Thank you. Somehow, I did not know about this.

Edit: This seems to only be for web apps, not native apps. Or am I missing something?


It is certainly possible to write one. All the back-end stuff can be reused.


This will improve my life I think, installing now and thank you!


Glad to hear. If you run into any issues, please file it on the github page. We tried to simplify it a lot, but there are a lot of moving parts and we can improve even more.


Wow, I never thought it would be possible to use the webkit developer tools for a completely different technology stack to such an extent.

Impressive to say the least.


This is really cool for my projects, however, are there any other tools that can be used ananlyze other binaries without compiling?


Impressive looking tool. I hope the intern is getting paid because he's adding a lot of value to Square and the dev community too. (Seems like a chance to plug http://gittip.com/ now!)


I believe it wouldn't even be legal for an unpaid intern to be used for "actual work", as they're supposed to strictly be involved in mentoring/training activities. Hopefully Square knows that, and wouldn't try to treat its employees unfairly in the first place. They seem like a great company.


Programming internships are typically paid positions. I can't speak for Square, but every other programming internship I'm aware of (even at other startups like Path) were paid.


Yes, we do pay our interns.


Legal or not, it's all too common outside of the tech industry, especially in the creative industry.


Square pays their interns.


Definitely getting paid. Square treats us interns well. :)


It's also possible to inspect HTML/JS on WebView based apps (phonegap)?


That's been possible since the release of iOS5 through a private API (which is sufficient for debugging): http://atnan.com/blog/2011/11/17/enabling-remote-debugging-v...

iOS6 makes the feature officially supported (though the API for webview-based apps is probably different, I haven't checked): http://taitems.tumblr.com/post/24936855546/what-ios-6-mobile...


Interesting tool.

I've done something like this in the past using Charles or Fiddler and the proxy settings on my iOS device.


What is the advantage of this tool over Charles?


Charles requires you to proxy your device's networking through your computer, which is annoying to set up, and doubly-so if you need to sniff https. PonyDebugger looks great because it doesn't interfere with the normal networking behavior.


Except requiring you to compile it into your app. Presumably you're not including it in every build configuration, but that means you can't run it against just any build.

I think it only does outgoing requests, but rvictl can also be handy for inspecting iOS network traffic. With a single command on your Mac, it directs device traffic through a network interface on the Mac. Wireshark works great on it.


Browsing CoreData stores on the device is very handy.


Very cool - but seems like more of a monitor than a debugger (titles are always over-sensationalized I suppose).




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: