Acton does not have a standaloneDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ton-blockchain/acton/llms.txt
Use this file to discover all available pages before exploring further.
acton debug command. Instead, source-level debugging is activated by passing --debug to acton test or acton script. When the flag is present, Acton compiles the target code with debug metadata and source maps, then starts a local Debug Adapter Protocol (DAP) server that any compatible editor can attach to — including VS Code and IntelliJ/JetBrains IDEs.
For replaying a real historical transaction with source-level stepping, use
acton retrace <HASH> --contract <NAME> --debug. That command is documented separately in the Command Reference.Debug flags reference
acton test —debug
| Flag | Type | Default | Description |
|---|---|---|---|
--debug | flag | — | Enable the DAP debug server for test execution |
--debug-port | number | 12345 | Port for the DAP server on 127.0.0.1 |
--backtrace | enum | — | Backtrace mode without the debugger: full |
--filter | string | — | Regex filter — narrow to one test for debug sessions |
--verbose | flag | — | Increase executor log verbosity (level 1) |
acton script —debug
| Flag | Type | Default | Description |
|---|---|---|---|
--debug | flag | — | Enable the DAP debug server for script execution |
--debug-port | number | 12345 | Port for the DAP server on 127.0.0.1 |
--backtrace | enum | — | Backtrace mode without the debugger: full |
--net | string | — | Broadcast network (omit for local emulation) |
Starting a debug session
- Debug a test
- Debug a script
DAP server listening on 127.0.0.1:4711 when ready. Attach from your editor next.Connecting VS Code
Using the TON VS Code extension (recommended)
Install the TON VS Code extension. The extension adds a dedicated Tolk debugger type and can auto-launchacton test --debug or acton script --debug from the IDE run panel.
Manual launch.json setup
If you prefer a manual configuration, create.vscode/launch.json in your project:
.vscode/launch.json
The Acton DAP server must be running and listening before you launch the VS Code configuration. The server prints a ready message when it is accepting connections.
Debugger capabilities
The Acton debugger supports:| Feature | Supported |
|---|---|
| Source breakpoints | ✅ |
| Conditional breakpoints | ✅ (fail-loud — evaluation failures surface as stops) |
| Continue, step over, step into, step out | ✅ |
| Instruction-level stepping | ✅ |
| Exception break filters | ✅ (Uncaught Exceptions, All Exceptions) |
| Stack traces | ✅ |
| Local variable inspection | ✅ (tuples, maps, arrays, structs, cells, unions) |
| Hover, watch, and debug-console evaluation | ✅ (side-effect-free subset) |
Registers scope (c4 storage, c5 actions, c7 temp) | ✅ (live sessions only) |
| Nested send/get-method child sessions | ✅ |
| Step-back | ❌ |
| Data breakpoints | ❌ |
| Function breakpoints | ❌ |
The Registers scope
Live debug sessions (test and script) expose aRegisters scope in the Variables panel:
c4 (storage)— current contract storage, rendered in structured contract-aware formc5 (output actions)— output actions already prepared in the current executionc7 (temporary data)— runtime temporary data
acton retrace --debug sessions (replay mode) do not have the live register view.
Expression evaluation limits
Evaluation in watches, hover, and conditional breakpoints supports:- Local variables from the selected frame
- Field access (
foo.bar) and numeric indexing (foo.items.0) - Boolean, string, integer, and
nullliterals !, unary-,&&,||,==,!=,<,<=,>,>=- Typed cell casts:
someCell as Cell<Foo>orsomeSlice as Cell<Foo>
Backtraces without the live debugger
When you need source locations and call-path attribution without setting up the full DAP workflow, use--backtrace full:
Debugging decision guide
| Question | Best tool |
|---|---|
| Print a value from a test or script | println(...) |
| Print a value from TVM contract code | debug.print* |
| Inspect a transaction tree quickly | println(txs) / matcher output |
| Get source locations without a live debugger | --backtrace full |
| Set breakpoints and step through Tolk code | acton test --debug or acton script --debug |
| Debug a real historical on-chain transaction | acton retrace <HASH> --contract <NAME> --debug |
Examples
Practical limits
acton test --debugis a poor fit for running an entire test suite — narrow to one test with--filter.- Live stepping into remote or forked contracts may still run, but source-level fidelity depends on having matching local debug info.
acton script --debugdoes not provide source-level stepping inside the real on-chain wallet broadcast after the script hands control to the network.- The debugger does not support step-back, data breakpoints, function breakpoints, or restart-style flows.
See Also
- Debugging guide — full debugging reference including retrace, fork testing, and snapshots
acton retrace(see Command Reference) — replay a historical transaction with source-level debuggingacton test— full test command referenceacton script— full script command reference