{"id":145,"date":"2026-03-21T22:47:19","date_gmt":"2026-03-21T14:47:19","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/help-debugging\/"},"modified":"2026-03-21T23:08:52","modified_gmt":"2026-03-21T15:08:52","slug":"help-debugging","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/help-debugging\/","title":{"rendered":"\u8c03\u8bd5"},"content":{"rendered":"<h1>\u8c03\u8bd5<\/h1>\n<p>\u672c\u9875\u4ecb\u7ecd\u7528\u4e8e\u6d41\u5f0f\u8f93\u51fa\u7684\u8c03\u8bd5\u8f85\u52a9\u5de5\u5177\uff0c\u7279\u522b\u662f\u5f53\u63d0\u4f9b\u5546\u5c06\u63a8\u7406\u6df7\u5165\u6b63\u5e38\u6587\u672c\u65f6\u3002<\/p>\n<h2>\u8fd0\u884c\u65f6\u8c03\u8bd5\u8986\u76d6<\/h2>\n<p>\u5728\u804a\u5929\u4e2d\u4f7f\u7528 <code>\/debug<\/code> \u8bbe\u7f6e<strong>\u4ec5\u8fd0\u884c\u65f6<\/strong>\u914d\u7f6e\u8986\u76d6\uff08\u5185\u5b58\u4e2d\uff0c\u4e0d\u5199\u5165\u78c1\u76d8\uff09\u3002<br \/>\n<code>\/debug<\/code> \u9ed8\u8ba4\u7981\u7528\uff1b\u901a\u8fc7 <code>commands.debug: true<\/code> \u542f\u7528\u3002<br \/>\n\u5f53\u4f60\u9700\u8981\u5207\u6362\u4e0d\u5e38\u7528\u7684\u8bbe\u7f6e\u800c\u4e0d\u7f16\u8f91 <code>openclaw.json<\/code> \u65f6\uff0c\u8fd9\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code>\/debug show\n\/debug set messages.responsePrefix=&quot;[openclaw]&quot;\n\/debug unset messages.responsePrefix\n\/debug reset\n<\/code><\/pre>\n<p><code>\/debug reset<\/code> \u6e05\u9664\u6240\u6709\u8986\u76d6\u5e76\u8fd4\u56de\u5230\u78c1\u76d8\u4e0a\u7684\u914d\u7f6e\u3002<\/p>\n<h2>Gateway \u7f51\u5173\u76d1\u89c6\u6a21\u5f0f<\/h2>\n<p>\u4e3a\u4e86\u5feb\u901f\u8fed\u4ee3\uff0c\u5728\u6587\u4ef6\u76d1\u89c6\u5668\u4e0b\u8fd0\u884c Gateway \u7f51\u5173\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\npnpm gateway:watch &#8211;force<\/p>\n<pre><code>\n\u8fd9\u6620\u5c04\u5230\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\ntsx watch src\/entry.ts gateway --force\n<\/code><\/pre>\n<p>\u5728 <code>gateway:watch<\/code> \u540e\u6dfb\u52a0\u4efb\u4f55 Gateway \u7f51\u5173 CLI \u6807\u5fd7\uff0c\u5b83\u4eec\u5c06\u5728\u6bcf\u6b21\u91cd\u542f\u65f6\u4f20\u9012\u3002<\/p>\n<h2>Dev \u914d\u7f6e\u6587\u4ef6 + dev Gateway \u7f51\u5173\uff08&#8211;dev\uff09<\/h2>\n<p>\u4f7f\u7528 dev \u914d\u7f6e\u6587\u4ef6\u6765\u9694\u79bb\u72b6\u6001\uff0c\u5e76\u542f\u52a8\u4e00\u4e2a\u5b89\u5168\u3001\u53ef\u4e22\u5f03\u7684\u8c03\u8bd5\u8bbe\u7f6e\u3002\u6709<strong>\u4e24\u4e2a<\/strong> <code>--dev<\/code> \u6807\u5fd7\uff1a<\/p>\n<ul>\n<li><strong>\u5168\u5c40 <code>--dev<\/code>\uff08\u914d\u7f6e\u6587\u4ef6\uff09\uff1a<\/strong> \u5c06\u72b6\u6001\u9694\u79bb\u5230 <code>~\/.openclaw-dev<\/code> \u4e0b\uff0c\u5e76\u5c06 Gateway \u7f51\u5173\u7aef\u53e3\u9ed8\u8ba4\u4e3a <code>19001<\/code>\uff08\u6d3e\u751f\u7aef\u53e3\u968f\u4e4b\u79fb\u52a8\uff09\u3002<\/li>\n<li><strong><code>gateway --dev<\/code>\uff1a\u544a\u8bc9 Gateway \u7f51\u5173\u5728\u7f3a\u5931\u65f6\u81ea\u52a8\u521b\u5efa\u9ed8\u8ba4\u914d\u7f6e + \u5de5\u4f5c\u533a<\/strong>\uff08\u5e76\u8df3\u8fc7 BOOTSTRAP.md\uff09\u3002<\/li>\n<\/ul>\n<p>\u63a8\u8350\u6d41\u7a0b\uff08dev \u914d\u7f6e\u6587\u4ef6 + dev \u5f15\u5bfc\uff09\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\npnpm gateway:dev<br \/>\nOPENCLAW_PROFILE=dev openclaw tui<\/p>\n<pre><code>\n\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5168\u5c40\u5b89\u88c5\uff0c\u8bf7\u901a\u8fc7 `pnpm openclaw ...` \u8fd0\u884c CLI\u3002\n\n\u8fd9\u4f1a\u6267\u884c\uff1a\n\n1. **\u914d\u7f6e\u6587\u4ef6\u9694\u79bb**\uff08\u5168\u5c40 `--dev`\uff09\n   * `OPENCLAW_PROFILE=dev`\n   * `OPENCLAW_STATE_DIR=~\/.openclaw-dev`\n   * `OPENCLAW_CONFIG_PATH=~\/.openclaw-dev\/openclaw.json`\n   * `OPENCLAW_GATEWAY_PORT=19001`\uff08\u6d4f\u89c8\u5668\/\u753b\u5e03\u76f8\u5e94\u79fb\u52a8\uff09\n\n2. **Dev \u5f15\u5bfc**\uff08`gateway --dev`\uff09\n   * \u5982\u679c\u7f3a\u5931\u5219\u5199\u5165\u6700\u5c0f\u914d\u7f6e\uff08`gateway.mode=local`\uff0c\u7ed1\u5b9a loopback\uff09\u3002\n   * \u5c06 `agent.workspace` \u8bbe\u7f6e\u4e3a dev \u5de5\u4f5c\u533a\u3002\n   * \u8bbe\u7f6e `agent.skipBootstrap=true`\uff08\u65e0 BOOTSTRAP.md\uff09\u3002\n   * \u5982\u679c\u7f3a\u5931\u5219\u586b\u5145\u5de5\u4f5c\u533a\u6587\u4ef6\uff1a\n     `AGENTS.md`\u3001`SOUL.md`\u3001`TOOLS.md`\u3001`IDENTITY.md`\u3001`USER.md`\u3001`HEARTBEAT.md`\u3002\n   * \u9ed8\u8ba4\u8eab\u4efd\uff1a**C3\u2011PO**\uff08\u793c\u4eea\u673a\u5668\u4eba\uff09\u3002\n   * \u5728 dev \u6a21\u5f0f\u4e0b\u8df3\u8fc7\u6e20\u9053\u63d0\u4f9b\u5546\uff08`OPENCLAW_SKIP_CHANNELS=1`\uff09\u3002\n\n\u91cd\u7f6e\u6d41\u7a0b\uff08\u5168\u65b0\u5f00\u59cb\uff09\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\npnpm gateway:dev:reset\n<\/code><\/pre>\n<p>\u6ce8\u610f\uff1a<code>--dev<\/code> \u662f<strong>\u5168\u5c40<\/strong>\u914d\u7f6e\u6587\u4ef6\u6807\u5fd7\uff0c\u4f1a\u88ab\u67d0\u4e9b\u8fd0\u884c\u5668\u541e\u6389\u3002<br \/>\n\u5982\u679c\u4f60\u9700\u8981\u660e\u786e\u62fc\u5199\uff0c\u8bf7\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u5f62\u5f0f\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nOPENCLAW_PROFILE=dev openclaw gateway &#8211;dev &#8211;reset<\/p>\n<pre><code>\n`--reset` \u6e05\u9664\u914d\u7f6e\u3001\u51ed\u8bc1\u3001\u4f1a\u8bdd\u548c dev \u5de5\u4f5c\u533a\uff08\u4f7f\u7528 `trash`\uff0c\u800c\u975e `rm`\uff09\uff0c\u7136\u540e\u91cd\u65b0\u521b\u5efa\u9ed8\u8ba4\u7684 dev \u8bbe\u7f6e\u3002\n\n\u63d0\u793a\uff1a\u5982\u679c\u975e dev Gateway \u7f51\u5173\u5df2\u5728\u8fd0\u884c\uff08launchd\/systemd\uff09\uff0c\u8bf7\u5148\u505c\u6b62\u5b83\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw gateway stop\n<\/code><\/pre>\n<h2>\u539f\u59cb\u6d41\u65e5\u5fd7\uff08OpenClaw\uff09<\/h2>\n<p>OpenClaw \u53ef\u4ee5\u5728\u4efb\u4f55\u8fc7\u6ee4\/\u683c\u5f0f\u5316\u4e4b\u524d\u8bb0\u5f55<strong>\u539f\u59cb\u52a9\u624b\u6d41<\/strong>\u3002<br \/>\n\u8fd9\u662f\u67e5\u770b\u63a8\u7406\u662f\u5426\u4f5c\u4e3a\u7eaf\u6587\u672c\u589e\u91cf\u5230\u8fbe\uff08\u6216\u4f5c\u4e3a\u5355\u72ec\u7684\u601d\u8003\u5757\uff09\u7684\u6700\u4f73\u65b9\u5f0f\u3002<\/p>\n<p>\u901a\u8fc7 CLI \u542f\u7528\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\npnpm gateway:watch &#8211;force &#8211;raw-stream<\/p>\n<pre><code>\n\u53ef\u9009\u8def\u5f84\u8986\u76d6\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\npnpm gateway:watch --force --raw-stream --raw-stream-path ~\/.openclaw\/logs\/raw-stream.jsonl\n<\/code><\/pre>\n<p>\u7b49\u6548\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nOPENCLAW_RAW_STREAM=1<br \/>\nOPENCLAW_RAW_STREAM_PATH=~\/.openclaw\/logs\/raw-stream.jsonl<\/p>\n<pre><code>\n\u9ed8\u8ba4\u6587\u4ef6\uff1a\n\n`~\/.openclaw\/logs\/raw-stream.jsonl`\n\n## \u539f\u59cb\u5757\u65e5\u5fd7\uff08pi-mono\uff09\n\n\u8981\u5728\u89e3\u6790\u4e3a\u5757\u4e4b\u524d\u6355\u83b7**\u539f\u59cb OpenAI \u517c\u5bb9\u5757**\uff0cpi-mono \u66b4\u9732\u4e86\u4e00\u4e2a\u5355\u72ec\u7684\u65e5\u5fd7\u8bb0\u5f55\u5668\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nPI_RAW_STREAM=1\n<\/code><\/pre>\n<p>\u53ef\u9009\u8def\u5f84\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nPI_RAW_STREAM_PATH=~\/.pi-mono\/logs\/raw-openai-completions.jsonl<\/code><\/p>\n<p>\u9ed8\u8ba4\u6587\u4ef6\uff1a<\/p>\n<p><code>~\/.pi-mono\/logs\/raw-openai-completions.jsonl<\/code><\/p>\n<blockquote>\n<p>\u6ce8\u610f\uff1a\u8fd9\u4ec5\u7531\u4f7f\u7528 pi-mono \u7684 <code>openai-completions<\/code> \u63d0\u4f9b\u5546\u7684\u8fdb\u7a0b\u53d1\u51fa\u3002<\/p>\n<\/blockquote>\n<h2>\u5b89\u5168\u6ce8\u610f\u4e8b\u9879<\/h2>\n<ul>\n<li>\u539f\u59cb\u6d41\u65e5\u5fd7\u53ef\u80fd\u5305\u542b\u5b8c\u6574\u63d0\u793a\u3001\u5de5\u5177\u8f93\u51fa\u548c\u7528\u6237\u6570\u636e\u3002<\/li>\n<li>\u4fdd\u6301\u65e5\u5fd7\u5728\u672c\u5730\u5e76\u5728\u8c03\u8bd5\u540e\u5220\u9664\u5b83\u4eec\u3002<\/li>\n<li>\u5982\u679c\u4f60\u5206\u4eab\u65e5\u5fd7\uff0c\u8bf7\u5148\u6e05\u9664\u5bc6\u94a5\u548c\u4e2a\u4eba\u8eab\u4efd\u4fe1\u606f\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8c03\u8bd5 \u672c\u9875\u4ecb\u7ecd\u7528\u4e8e\u6d41\u5f0f\u8f93\u51fa\u7684\u8c03\u8bd5\u8f85\u52a9\u5de5\u5177\uff0c\u7279\u522b\u662f\u5f53\u63d0\u4f9b\u5546\u5c06\u63a8\u7406\u6df7\u5165\u6b63\u5e38\u6587\u672c\u65f6\u3002 \u8fd0\u884c\u65f6\u8c03\u8bd5\u8986\u76d6 \u5728\u804a\u5929\u4e2d\u4f7f\u7528  [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-145","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=145"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"predecessor-version":[{"id":440,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/145\/revisions\/440"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}