SwiftUI Preview crashed

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.

Quote of the week

"People ask me what I do in the winter when there's no baseball. I'll tell you what I do. I stare out the window and wait for spring."

~ Rogers Hornsby