Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt

Use this file to discover all available pages before exploring further.

The trace command reads compiler or Forge test output — either from stdin or a file — and rewrites every .sol:line reference back to the corresponding .ts:line using the source maps generated by build. This lets you read stack traces, revert messages, and test failure output entirely in TypeScript terms without mentally translating line numbers.
solidscript trace

Options

FlagDescription
-i, --input <file>Path to a file containing trace output. Reads from stdin when omitted.
--sourcemap-dir <dir>Directory containing <Contract>.sourcemap.json files. Defaults to out/sol.

Examples

# Pipe Forge output directly through trace
forge test 2>&1 | npx solidscript trace

# Rewrite a saved trace file
npx solidscript trace -i forge-output.txt
Source maps must exist for the contract being traced. If the source map is missing or stale, run solidscript build first to regenerate it, then re-run the failing test and pipe the fresh output through trace.