Is it possible to search though all xcodes logs

后端 未结 3 2030
小鲜肉
小鲜肉 2021-02-05 17:42

XCode now keeps the logs from the previous runs handy which is great.

\"enter

Is t

相关标签:
3条回答
  • 2021-02-05 17:49

    The folder where these logs are is

    ~/Library/Developer/Xcode/DerivedData/[YOURAPPID]/Logs/Debug/
    

    You can open/read/search them for example in TextWrangler.

    0 讨论(0)
  • 2021-02-05 17:59

    To add onto @DrummerB answer. Once the files are unziped you can do a search with custom scope from within XCode. I prefer this to grep or spotlight.

    enter image description here

    enter image description here

    enter image description here

    0 讨论(0)
  • 2021-02-05 18:01

    Xcode stores debug logs at

    ~/Library/Developer/Xcode/DerivedData/<YOURAPP>/Logs/Debug/
    

    The .xcactivitylog files are actually just gz archives. Decompress them:

    cd ~/Library/Developer/Xcode/DerivedData/<YOURAPP>/Logs/Debug/
    EXT=".xcactivitylog"
    for LOG in *.xcactivitylog; do
        NAME=`basename $LOG $EXT`
        gunzip -c -S $EXT "${NAME}${EXT}" > "${NAME}.log"
    done
    

    Now you can easily search them using grep or Spotlight or what your prefer.

    0 讨论(0)
提交回复
热议问题