追記: パッケージ化した → 1024jp/Moof –GitHub 自分で使ってるデバッグ関数がそこそこ便利なので単に自慢したいだけです。 それがこの moof() コマンドだ。ただー! /// debug friendly print with a dog/cow. func moof(_ items: Any..., function: String = #function) { let icon = Thread.isMainThread ? "🐕" : "🐄" Swift.print(icon + " \(function) ", terminator: "") if items.isEmpty { Swift.print("") } else { Swift.debugPrint(items) } }