Skip to content

Instantly share code, notes, and snippets.

@leovandriel
Created September 26, 2012 12:49
Show Gist options
  • Save leovandriel/3787815 to your computer and use it in GitHub Desktop.
Save leovandriel/3787815 to your computer and use it in GitHub Desktop.
A Minimal PonyDebugger setup in Objective-C
// A Minimal PonyDebugger setup in Objective-C
// Add these lines to application:didFinishLaunchingWithOptions: and add the
// PonyDebugger and SocketRocket libs/frameworks to your project. Read the
// Quick Start at https://github.com/square/PonyDebugger#quick-start
// For on-device debugging, use `ponyd serve -i 0.0.0.0` and replace `localhost`.
// Author: Leonard van Driel, 2012
#if DEBUG
PDDebugger *debugger = (PDDebugger *)[NSClassFromString(@"PDDebugger") defaultInstance];
[debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]];
[debugger enableNetworkTrafficDebugging];
[debugger forwardAllNetworkTraffic];
[debugger enableCoreDataDebugging];
[debugger addManagedObjectContext:self.managedObjectContext withName:@"MOC"];
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment