swift-backtrace

1.3.5

💥 Backtraces for Swift on Linux and Windows
swift-server/swift-backtrace

What's New

SwiftBacktrace 1.3.5

2024-06-17T09:36:49Z

What's Changed

  • Add CI for Swift 5.10 by @yim-lee in #70
  • Do not build Demangle on Swift 5.9 or above by @euanh in #73

New Contributors

  • @euanh made their first contribution in #73

Full Changelog: 1.3.4...1.3.5

Backtrace

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

The library is designed to fill a gap in backtraces support for Swift on non-Darwin platforms. When this gap is closed at the language runtime level, this library will become redundant and be deprecated.

Usage

Note: You do not need this library on Linux as of Swift 5.9, which has built-in backtracing support.

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, for Swift < 5.2, make sure you build your application with debug symbols enabled. Debug symbols are automatically included for Swift 5.2 and above.

$ swift build -c release -Xswiftc -g

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

Security

Please see SECURITY.md for details on the security process.

Acknowledgements

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

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

Saleem Abdulrasool (GitHub, Twitter) for the Windows port.

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

Last updated: Sun Nov 24 2024 21:35:17 GMT-1000 (Hawaii-Aleutian Standard Time)