plcrashreport-decoder

A decoder for iOS/macOS crash reports generated by PLCrashReporter

Usage no npm install needed!

<script type="module">
  import plcrashreportDecoder from 'https://cdn.skypack.dev/plcrashreport-decoder';
</script>

README

plcrashreport-decoder

A decoder for iOS/macOS crash reports generated by PLCrashReporter

badge

Installation

npm install plcrashreport-decoder --save

Usage

Module

// import
const CrashReport = require('plcrashreport-decoder');

// read crash report file
const fs = require('fs');
let buffer = fs.readFileSync('path/to/crashreport');

// create a CrashReport object. The constructor accepts Buffer, Array ([number]) and ArrayBuffer.
let cr = new CrashReport(buffer);

// get the decoded JSON
let decoded = cr.toJSON();

CLI

Please run npm link before using CLI.

pl-decode example.plcrash -t json

Parameters

-f: Format of decoded crash report. Can be default, string or json.

Browser

Include the minified JavaScript file in your HTML, and you will be able to use the CrashReport class.

<script src="dist/crashreport.min.js"></script>

Please see example.html for details.

Build

Run npm run build to build a minified UMD bundle.

Acknowledgement

License

The project is released under MIT license. Please see LICENSE for full terms.