Xcode 15 locking up my app from running: 1 log/signpost messages lost due to high rates in live mode recording?
Asked Answered
C

3

14

This just started today in Xcode 15. I haven't added any new logs or print statements but when I build and run on my iPhone 14 Pro, I tap on a view in my app, the console is printing:

1 log/signpost messages lost due to high rates in live mode recording. To guarantee delivery of all logs, set IDELogRedirectionPolicy to oslogToStdio in the environment of the executable.

tons of times. When I build and run the exact same code on my iPhone 13 mini, it doesn't do it?

Christiechristin answered 4/10, 2023 at 15:21 Comment(2)
Well, it turned out to be one of those Apple bugs that just isn't communicated well. I'm not 100% sure what it was, but I think I added an additional piece of logic that made the overall processing load in the app too high which for some reason generated this console log and the freeze. I removed the additional logic and it went away.Christiechristin
do you have any reference/info on the Apple bug?Doings
S
16

I had the same thing, but only when I ran my app on a physical device. I couldn't debug anymore because my debug area in XCode kept on showing these messages.

So I did what the log message said and added the environment variable IDELogRedirectionPolicy with value oslogToStdio to the environment of the executable. Now I don't see these messages anymore in my debug area.

Stryker answered 8/10, 2023 at 5:50 Comment(2)
This solution removes the ability to sort and filter logged messages in Xcode 15, all logs lose their colored metadata info and look equalSeminary
If you keep this environment variable indefinitely, does this apply to 'Release' configuration builds as well?Mckissick
G
13

To set the environment variable as the log output suggests, go to 'Edit Scheme...', on the left column 'Run Debug' should be highlighted, select the 'Arguments' tab, under the 'Environment Variables' click the the plus (+) sign, under name fill in IDELogRedirectionPolicy, under value fill in oslogToStdio

Gutenberg answered 19/10, 2023 at 14:51 Comment(0)
P
7

Follow the below steps

Open Edit Schema

enter image description here

Then follow the below screenshot and update the text IDELogRedirectionPolicy and oslogToStdio

enter image description here

Phlox answered 28/11, 2023 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.