Is it possible to search though all xcodes logs

后端 未结 3 2029
小鲜肉
小鲜肉 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 18:01

    Xcode stores debug logs at

    ~/Library/Developer/Xcode/DerivedData//Logs/Debug/
    

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

    cd ~/Library/Developer/Xcode/DerivedData//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.

提交回复
热议问题