Swiftpack.co - Package - swift-server/swift-backtrace

Backtrace

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

Usage

Add https://github.com/swift-server/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.

Acknowledgements

Ian Partridge (GitHub, Twitter) the original author of this package.

Johannes Weiss (GitHub, Twitter) for the signal handling code.

Github

link
Stars: 195

Dependencies

Used By

Total: 0

Releases

1.2.0 -

  • add deprecation warning on Backtrace.print()

1.1.1 -

  • feat: cross-compilation support (#17)

1.1.0 -

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

1.0.3 -

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

1.0.2 -

  • feat: Support Swift 4.2 (#3)

1.0.1 -

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

1.0.0 -

  • Initial release