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!

4
  • This could be a good starting point stackoverflow.com/a/62704700/5329717 Commented Jan 6, 2022 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 ? Commented Jan 6, 2022 at 15:32
  • I haven't tried it, but this github.com/rocasa/ttylog looks promising. Oh btw poor man's color in logs in XCode debug console can be Emoji 🔵⚪️🔴. Commented Jan 6, 2022 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. Commented Jan 6, 2022 at 18:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.