Home

Switch language

Start Install GuideQuick StartDocs Overview
Docs ChannelsModels & APIGateway OpsTools & Skills
More ArticlesResourcesHelp Center
Get Started
Documentation navigation Help Center
Help Center 4 sections

Debugging

Debugging

Use this page when you are not just trying to recover from a problem, but want to do local development, inspect raw model streams, trace provider output or isolate a disposable dev environment.

Runtime Debug Overrides

/debug command

Use this to set temporary debugging overrides that only affect the current runtime and do not get written back to disk.

Typical commands

/debug show, /debug set messages.responsePrefix="[openclaw]", /debug reset

Development and Watch Mode

Gateway watch mode

pnpm gateway:watch --force

Dev profile plus dev Gateway

Keep state, config and workspace in a disposable environment instead of polluting your main setup.
pnpm gateway:dev
OPENCLAW_PROFILE=dev openclaw tui

Reset the dev environment

pnpm gateway:dev:reset

Raw Stream Logs

Record raw OpenClaw assistant streams

pnpm gateway:watch --force --raw-stream
pnpm gateway:watch --force --raw-stream --raw-stream-path ~/.openclaw/logs/raw-stream.jsonl

Record raw pi-mono blocks

PI_RAW_STREAM=1
PI_RAW_STREAM_PATH=~/.pi-mono/logs/raw-openai-completions.jsonl
These logs may contain full prompts, tool outputs and user data. Use them for local debugging only and clean them up quickly.

Debugging Safety Notes

Raw stream logs can contain complete prompts, tool output, user data and secret-adjacent context. Do not keep them indefinitely.

If you need to share logs, manually remove tokens, personal identity data and sensitive workspace paths first.

If a non-dev Gateway is still running, stop it before starting watch mode or the dev environment so you do not debug the wrong state directory.