Swiftpack.co - Package - ianpartridge/swift-backtrace

Backtrace

This Swift package provides support for automatically printing crash backtraces of Swift programs.

Usage

Add https://github.com/ianpartridge/swift-backtrace.git as a dependency in your Package.swift.

Crash backtraces

In your main.swift, do:

import Backtrace

// Do this first
Backtrace.install()

Finally, make sure you build your application with debug symbols enabled:

$ swift build -c release -Xswiftc -g

When your app crashes, a stacktrace will be printed to stderr.

Printing a backtrace at any time

import Backtrace

Backtrace.print() // Goes to stderr

Acknowledgements

@weissi, for the signal handling code!

Github

link
Stars: 130
Help us keep the lights on

Dependencies

Releases

1.1.1 - Sep 3, 2019

  • feat: cross-compilation support (#17)

1.1.0 - Jul 22, 2019

  • feat: add Backtrace.print() function (#15)

1.0.3 - Jul 18, 2019

  • feat: use libbacktrace (#8)
  • feat: automatic demangling of Swift symbols (#10)

1.0.2 - Apr 24, 2019

  • feat: Support Swift 4.2 (#3)

1.0.1 - Apr 20, 2019

  • fix: swift test on Linux (#1)
  • fix: Build CBacktrace as a system library (#2)