0

While developping an app for an iPad on my Mac, I use print logs to monitor what is going on (regular prints in Swift code). However I really don't like the Xcode console, and I'd like to be able to redirect the stream to a file, where I can then read it with a better log viewer (and add color!).

I'm executing the app in debug mode through Wifi on my iPad, but I want the logs on my Mac, so storing the logs to a file on the device is not really interesting (SO question here). Wrapping the debugger executable seems interesting, as suggested here but I couldn't find anything more recent (with lldb).

Alternatively, I could also run the debugger from the console and handler the redirection from there, but I don't know how to do that for debugging on a remote device over WiFi.

Any help would be greatly appreciated!

Big Bro
  • 797
  • 3
  • 12
  • This could be a good starting point https://stackoverflow.com/a/62704700/5329717 – Kamil.S Jan 06 '22 at 10:53
  • Nice! It's really interesting. Do you have any idea how to capture / monitor what is written to any of these tty ? – Big Bro Jan 06 '22 at 15:32
  • I haven't tried it, but this https://github.com/rocasa/ttylog looks promising. Oh btw poor man's color in logs in XCode debug console can be Emoji ⚪️. – Kamil.S Jan 06 '22 at 15:45
  • Thanks! I stumbled upon it, unfortunately it doesn't seem to be ported (or maintained?) on Mac. I had a look at the code but it's way too complex for me :) you have a point with emojis, but I also want to store the logs for later analysis for example. – Big Bro Jan 06 '22 at 18:48

0 Answers0