square / PonyDebugger

Remote network and data debugging for your native iOS app using Chrome Developer Tools
Other
5.87k stars 595 forks source link

Fallback support for inactive socket #130

Closed matteocrippa closed 8 years ago

matteocrippa commented 9 years ago

The main goal is to allow any user (even if he/she hasn't installed or forget to start ponyd) to be able to still debug any part of the code.

The new few lines make a check about the socket activity and route the output between Ponydebugger and classic NSLog

wlue commented 9 years ago

I like this, but it should be an option, probably on PDDebugger as logOptions. Something like this?

typedef NS_ENUM(NSInteger, PDDebuggerLog) {
    PDDebuggerLogToSocket = 0,
    PDDebuggerLogToConsoleWhenDisconnected,
    PDDebuggerLogToConsoleAlways
};
matteocrippa commented 9 years ago

@wlue so do you prefer to extend the feature not only like a fallback for ppl that forget to start it off, but with a real new feature that allow the user to setup a fallback or route directly (and always) to nslog

wlue commented 9 years ago

Yeah, it should be pretty simple. I don't think it always makes sense to NSLog the results of PDLog.

matteocrippa commented 9 years ago

@wlue with latest push e3acdad some style issue are now fixed and the use flow has been revamped according your idea. I added an extra few funcs in order to switch between logging systems

kwigginton commented 9 years ago

This looks really great! Wonderful addition to PonyDebugger for those wanting to debug without internet or a server set up.

Would you be willing to sign our CLA: http://squ.re/sign-the-cla Also, had a few comments. Once addressed will re-review and merge!

RoyalPineapple commented 8 years ago

Closing this PR as it hasn't been updated since July. Please address any comments and re-open.