Target Application Logs Not showing while running XCUITest

In our application, we are having custom logging. When the project is compiled locally on the XCode, I can see that those logs are appearing properly on Xcode Console (Debug Area). Also, when compiling the UITest scheme, the application logs are appearing as expected. But when I run a uitest, then only test runner logs are showing up in debug area. When I select My application target then it's not having application logs.


Is this something expected? Is there any setting that I have to turn ON with in Xcode?

Any help will be really appreciated.


Thanks

Solution: Choose the App target -> 2 as indicated in the screenshot to print app logs in the console.

Unfortunately the solution posted above doesn't work for me. Logs from app under test are empty all the time.

Same thing happening for me. We believe this started fairly recently.

I've been seeing this for a while now, still happening on Xcode 14.3

In one of my apps that uses the Proximal Atlantis library I see logs from Atlantis coming out, but none of my own.

Atlantis uses print from Swift while my logs are mostly coming from NSLog (Objective-C)

If I add logs from Swift using print they show up (they don't if I use NSLog from Swift)

So there's a potential workaround there but it would be great for the logging to be consistently output!

Target Application Logs Not showing while running XCUITest
 
 
Q