How can I get the console logs from the iOS Simulator?

前端 未结 13 1532
感情败类
感情败类 2020-11-27 09:24

I want to see what happens in the iOS Simulator if I\'m not testing the app in Xcode.

For example, if I open a link in the Safari simulator, see what happens in the

13条回答
  •  遥遥无期
    2020-11-27 10:03

    iOS Simulator > Menu Bar > Debug > Open System Log


    Old ways:

    iOS Simulator prints its logs directly to stdout, so you can see the logs mixed up with system logs.

    Open the Terminal and type: tail -f /var/log/system.log

    Then run the simulator.

    EDIT:

    This stopped working on Mavericks/Xcode 5. Now you can access the simulator logs in its own folder: ~/Library/Logs/iOS Simulator//system.log

    You can either use the Console.app to see this, or just do a tail (iOS 7.0.3 64 bits for example):

    tail -f ~/Library/Logs/iOS\ Simulator/7.0.3-64/system.log

    EDIT 2:

    They are now located in ~/Library/Logs/CoreSimulator//system.log

    tail -f ~/Library/Logs/CoreSimulator//system.log

提交回复
热议问题