How to Find the Latest SwiftUI Preview Crash Log on Mac

How to check latest SwiftUI preview crash log in Xcode

SwiftUI Preview crashed

6a3a6 a621f screenshot2023 02 12at3.15.18pm

Preview Crashed logs are saved at “~/Library/Logs/DiagnosticReports

on Xcode, It’s hard to check the logs. so I made a bash script to open the latest crash log file “latestPreviewCrash.sh“

#!/bin/bash
cd ~/Library/Logs/DiagnosticReports
file=$(ls XCPreview* | head -1)
open $file

run this script

sh latestPreviewCrash.sh

It will open the crash logs.

Discover more from Shawn

Subscribe now to keep reading and get access to the full archive.

Continue reading