A comprehensive .NET library and command-line utility for parsing and converting PLCrash reports to iOS-compatible crash logs. Based on the original PLCrashReporter project, this C# implementation provides both programmatic API access via PLCrashUtilLib and a convenient CLI tool via PLCrashUtil.
Package | Version | Description |
---|---|---|
PLCrashUtilLib | 1.1.3 | Class library for programmatic integration |
PLCrashUtil | 1.1.3 | Global CLI tool for command-line usage |
- β Parse PLCrashReporter protobuf format files
- β Convert to iOS-compatible text crash logs
- β Access structured crash data programmatically
- β Support for all PLCrash report versions
- β Available as both .NET library and global CLI tool
- β Cross-platform (.NET 6.0+)
Install the global CLI tool:
dotnet tool install --global PLCrashUtil
Add the library to your .NET project:
dotnet add package PLCrashUtilLib
Or via PackageManager:
<PackageReference Include="PLCrashUtilLib" Version="1.1.3" />
Once installed as a global tool, use the plcrashutil
command:
# Convert a PLCrash report to iOS format
plcrashutil convert --format=ios crash_report.plcrash
# Convert and save to file
plcrashutil convert --format=ios crash_report.plcrash > formatted_crash.txt
--format=ios
or--format=iphone
- Output iOS-compatible crash log format
using PLCrashUtilLib.Models;
// Load and parse a crash report
byte[] crashData = File.ReadAllBytes("crash_report.plcrash");
var crashReport = new PLCrashReport(crashData);
// Access structured data
Console.WriteLine($"App: {crashReport.ApplicationInfo.ApplicationIdentifier}");
Console.WriteLine($"Version: {crashReport.ApplicationInfo.ApplicationVersion}");
Console.WriteLine($"Crashed Thread: {crashReport.Threads.First(t => t.Crashed).ThreadNumber}");
// Convert to formatted text
string formattedReport = PLCrashReportTextFormatter.StringValueForCrashReport(
crashReport,
PLCrashReportTextFormat.PLCrashReportTextFormatiOS
);
Console.WriteLine(formattedReport);
- .NET 6.0 SDK or later
- Protocol Buffers compiler (
protoc
) - only needed if regenerating protobuf files
# Clone the repository
git clone https://github.com/BugSplatGit/plcrashutil-dotnet.git
cd plcrashutil-dotnet
# Build all projects
dotnet build
# Run unit tests
dotnet test
# Create NuGet packages
dotnet pack PLCrashUtilLib/PLCrashUtilLib.csproj --configuration Release
dotnet pack PLCrashUtil/PLCrashUtil.csproj --configuration Release
PLCrashUtilLib/
- Core library with crash report parsing logicPLCrashUtil/
- CLI tool that uses the libraryPLCrashUtilLib.Tests/
- Unit tests for the library
If you need to update the protobuf definitions:
protoc --csharp_out=. PLCrashReport.proto
The library includes comprehensive unit tests:
# Run all tests
dotnet test
# Run with detailed output
dotnet test --verbosity normal
# Run tests for specific project
dotnet test PLCrashUtilLib.Tests/
Test the CLI tool with the included sample files:
# CLI tool (if installed globally)
plcrashutil convert --format=ios fuzz_report.plcrash
# From source
dotnet run --project PLCrashUtil -- convert --format=ios fuzz_report.plcrash
- Platforms: Windows, macOS, Linux (any platform supporting .NET 6.0+)
- PLCrash Versions: All versions supported by PLCrashReporter
- .NET Versions: .NET 6.0 and later
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Based on the original PLCrashReporter project by Plausible Labs Cooperative, Inc.
Copyright (c) BugSplat LLC.
See ThirdPartyNotices.txt for information about third-party dependencies.