backtracing docs in Swift Server guides - #88
Conversation
| By default the trace includes registers and a list of loaded images for the crashed thread. | ||
| You can tune or suppress both; see <doc:swift-backtrace-configuration#Captured-content>. | ||
|
|
||
| ### Map a frame to source |
There was a problem hiding this comment.
We might want to hold off on this section; we've been working on a tool that can symbolicate the output from the backtracer automatically — we're just waiting for a new repository to be created under swiftlang then we can push the code and organise a blog post about it.
With the new tool, you can just feed your log file to swift-symbolicate and it will output the same log file but with any crash reports it finds within symbolicated — it also knows how to fetch debug symbols from debuginfod or Microsoft-style symbol servers, and additionally can be used to convert between JSON and human readable output formats.
The new tool also keeps any data in the output that isn't a Swift crash log, so you can just feed a raw copy of your stdout/stderr to it and you'll still have all the other output from your program.
There was a problem hiding this comment.
wow - nice! That sounds fantastic!
I'd prefer to include all the details now about how to get to what you critically need to debug your app, but then shift/update this content when that tool is available to reference it preferentially. Holding off on docs because we're going to be getting to it has led us into some traps in the past where timelines just didn't agree with our intentions, and I'd prefer to err on the side of having useful information in a developer's hands.
b0f44b3 to
c1db945
Compare
60f1eba to
a180ddb
Compare
… it into packaging and building adds debugging-a-service-using-a-backtrace.md covering how to persist, read, and symbolicate a swift-backtrace crash trace, and reproduce the crash locally. Links the runtime-image and static-binary packaging sections to it for installing the backtracer, and expands the building guide with sections on static vs dynamic stdlib linking, splitting debug info into a sidecar file, and verifying build IDs match. Points readers to the upstream Swift backtracing reference (swiftlang/swift docs/Backtracing.rst) instead of duplicating its configuration option details.
a180ddb to
833babf
Compare
|
rebase and collapsed the commits based on feedback into a single commit, and applied over the migrated content in the |
backtrace documentation
Summary
resolves #87
Validation
swift package generate-documentation --analyze --warnings-as-errorspassesswift package --disable-sandbox preview-documentationBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.