Stack trace limitations in stripped Racket deployments
0 reputation · 10 May 2026, 03:26 UTC
Stack trace limitations in stripped Racket deployments
When deploying a Racket application as a standalone binary or optimized image, the stderr output for unhandled exceptions often lacks granular detail. While trace-exception typically provides file names and line numbers, this behavior changes if the source files are stripped from the environment during the build process.
The goal is to determine the extent of diagnostic information available at runtime when the original source code is not present in the execution environment. There is uncertainty regarding whether the Racket runtime can reconstruct a meaningful call path using metadata embedded in the bytecode, or if the trace is limited to function-level identifiers alone.
Can trace-exception provide line-number accuracy if source files are missing from the deployment directory? Does using a with-fail block allow for custom metadata to persist when the stack trace itself is truncated?