browser-trace
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Trace
浏览器跟踪
Attach a second, read-only CDP client to a browser session that is already being driven by your main automation. The trace records the full DevTools firehose to NDJSON, polls for screenshots and DOM dumps in parallel, and slices everything into a directory tree that bash tools can search.
This skill does not drive pages — it only listens. Pair it with the skill, , Stagehand, Playwright, or anything else that speaks CDP.
browserbrowse为已由主自动化程序驱动的浏览器会话附加一个只读的第二个CDP客户端。该跟踪工具会将完整的DevTools事件流记录为NDJSON格式,同时并行轮询截图和DOM转储,并将所有内容分割为bash工具可搜索的目录树结构。
此技能不会驱动页面——它仅负责监听。可与技能、、Stagehand、Playwright或任何支持CDP的工具配合使用。
browserbrowseWhen to use
使用场景
- The user wants to debug a browser-automation run (failing form, missing element, hung navigation, JS exception).
- The user has a running automation and wants to attach a trace mid-flight without restarting it.
- The user wants to split a CDP firehose into network / console / DOM / page buckets.
- The user wants screenshots + DOM snapshots over time, joined to CDP events by timestamp.
If the user just wants to drive the browser, use the skill instead.
browser- 用户需要调试浏览器自动化运行任务(如表单提交失败、元素缺失、导航挂起、JS异常)。
- 用户正在运行自动化任务,希望在不重启的情况下中途附加跟踪工具。
- 用户希望将CDP事件流分割为网络/控制台/DOM/页面分组。
- 用户希望获取随时间变化的截图+DOM快照,并按时间戳与CDP事件关联。
如果用户仅需要驱动浏览器,请使用技能。
browserSetup check
安装检查
bash
node --version # require Node 18+
which browse || npm install -g browse
which jq || true # optional — used only for ad-hoc queryingVerify exists:
browse cdpbash
browse --help | grep -q "^\s*cdp " || echo "browse cdp not available — update browse"bash
node --version # 需要Node 18+版本
which browse || npm install -g browse
which jq || true # 可选——仅用于临时查询验证是否存在:
browse cdpbash
browse --help | grep -q "^\s*cdp " || echo "browse cdp不可用——请更新browse"How it works
工作原理
Every Chrome DevTools target accepts multiple concurrent CDP clients. Your main automation is one client; this skill adds a second one that only enables observation domains (Network, Console, Runtime, Log, Page) and never sends action commands.
The tracer has three pieces:
- Firehose: streams every CDP event as one JSON object per line to
browse cdp <target>.cdp/raw.ndjson - Sampler: a polling loop calls and
browse screenshot --cdp <target> --path <file>on an interval (default 2s). The helper passesbrowse get html body --cdp <target>when it samples so it can attach to the traced target from its own process; once a browse daemon session is attached to a CDP target, follow-up commands in that session do not need to repeat--cdp.--cdp - Bisector: after the run, walks
bisect-cdp.mjsonce, slices it into per-bucket JSONL files keyed by CDP method, and additionally bisects per page using top-levelraw.ndjsonevents as boundaries.Page.frameNavigated
每个Chrome DevTools目标都支持多个并发CDP客户端。主自动化程序是一个客户端;此技能会添加第二个客户端,仅启用观测域(Network、Console、Runtime、Log、Page),且从不发送操作命令。
跟踪器包含三个部分:
- 事件流(Firehose):将每个CDP事件以单行JSON对象的形式流式传输到
browse cdp <target>。cdp/raw.ndjson - 采样器(Sampler):轮询循环按指定时间间隔(默认2秒)调用和
browse screenshot --cdp <target> --path <file>。采样时辅助工具会传递browse get html body --cdp <target>参数,以便从自身进程附加到被跟踪的目标;一旦browse守护进程会话附加到CDP目标,该会话中的后续命令无需重复--cdp参数。--cdp - 分割器(Bisector):运行结束后,会遍历
bisect-cdp.mjs一次,将其分割为按CDP方法分组的JSONL文件,并使用顶层raw.ndjson事件作为边界,进一步按页面分割内容。Page.frameNavigated
Quickstart
快速开始
Local Chrome
本地Chrome浏览器
bash
undefinedbash
undefined1. Launch Chrome with a debugger port (any user-data-dir keeps it isolated).
1. 启动带有调试端口的Chrome浏览器(使用独立的user-data-dir保持隔离)。
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--remote-debugging-port=9222
--user-data-dir=/tmp/chrome-o11y
about:blank &
--remote-debugging-port=9222
--user-data-dir=/tmp/chrome-o11y
about:blank &
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--remote-debugging-port=9222
--user-data-dir=/tmp/chrome-o11y
about:blank &
--remote-debugging-port=9222
--user-data-dir=/tmp/chrome-o11y
about:blank &
2. Start the tracer.
2. 启动跟踪器。
node scripts/start-capture.mjs 9222 my-run
node scripts/start-capture.mjs 9222 my-run
3. Run your main automation against port 9222.
3. 针对9222端口运行主自动化程序。
browse open https://example.com --cdp 9222
browse open https://example.com --cdp 9222
...whatever the run does...
...执行自动化任务...
4. Stop and bisect.
4. 停止并分割跟踪数据。
node scripts/stop-capture.mjs my-run
node scripts/bisect-cdp.mjs my-run
undefinednode scripts/stop-capture.mjs my-run
node scripts/bisect-cdp.mjs my-run
undefinedBrowserbase remote
Browserbase远程浏览器
Two helpers wrap the platform-side bookkeeping: creates or attaches to a session and starts the tracer; pulls platform artifacts (final session metadata, server logs, downloads) into the run dir at the end.
bb-capture.mjsbb-finalize.mjsBrowserbase ends a session as soon as its last CDP client disconnects. Create with, then attach automation to the session's--keep-alivebefore or together with the tracer.connectUrlhandles the keep-alive session and tracer setup; your automation still needs to attach.bb-capture.mjs --new
bash
export BROWSERBASE_API_KEY=...两个辅助工具封装了平台端的记录工作:用于创建或附加到会话并启动跟踪器;在结束时将平台制品(最终会话元数据、服务器日志、下载文件)拉取到运行目录中。
bb-capture.mjsbb-finalize.mjs当最后一个CDP客户端断开连接时,Browserbase会立即结束会话。创建会话时使用参数,然后在启动跟踪器之前或同时将自动化程序附加到会话的--keep-alive。connectUrl会处理保活会话和跟踪器设置;你的自动化程序仍需附加到会话。bb-capture.mjs --new
bash
export BROWSERBASE_API_KEY=...1. Create a keep-alive session AND start the tracer in one step.
1. 一步完成创建保活会话并启动跟踪器。
Prints the session id, connectUrl prefix, and a live debugger URL you
打印会话ID、connectUrl前缀以及可在浏览器中打开的实时调试URL,
can open in a browser to watch the run interactively.
用于交互式查看运行过程。
node scripts/bb-capture.mjs --new my-run
node scripts/bb-capture.mjs --new my-run
2. Drive automation. bb-capture stamped the session id into the manifest.
2. 运行自动化程序。bb-capture已将会话ID标记到manifest中。
SID=$(jq -r .browserbase.session_id .o11y/my-run/manifest.json)
CONNECT_URL="$(browse cloud sessions get "$SID" | jq -r .connectUrl)"
BROWSE_NAME=my-run-browser
browse open https://example.com --cdp "$CONNECT_URL" --session "$BROWSE_NAME"
browse open https://news.ycombinator.com --session "$BROWSE_NAME"
SID=$(jq -r .browserbase.session_id .o11y/my-run/manifest.json)
CONNECT_URL="$(browse cloud sessions get "$SID" | jq -r .connectUrl)"
BROWSE_NAME=my-run-browser
browse open https://example.com --cdp "$CONNECT_URL" --session "$BROWSE_NAME"
browse open https://news.ycombinator.com --session "$BROWSE_NAME"
3. Stop the tracer, bisect, then pull platform artifacts and release.
3. 停止跟踪器、分割数据,然后拉取平台制品并释放会话。
node scripts/stop-capture.mjs my-run
node scripts/bisect-cdp.mjs my-run
node scripts/bb-finalize.mjs my-run --release
Attaching to a session that's *already running* (e.g. one your production worker created) — `bb-capture.mjs` accepts a session id instead of `--new`:
```bashnode scripts/stop-capture.mjs my-run
node scripts/bisect-cdp.mjs my-run
node scripts/bb-finalize.mjs my-run --release
附加到**已在运行**的会话(例如生产worker创建的会话)——`bb-capture.mjs`接受会话ID而非`--new`参数:
```bashPick a running session (filter client-side; browse cloud sessions list has no --status flag)
选择一个正在运行的会话(客户端过滤;browse cloud sessions list没有--status标志)
browse cloud sessions list | jq -r '.[] | select(.status == "RUNNING") | .id'
node scripts/bb-capture.mjs <session-id> mid-flight-debug
browse cloud sessions list | jq -r '.[] | select(.status == "RUNNING") | .id'
node scripts/bb-capture.mjs <session-id> mid-flight-debug
...tracer runs alongside the existing automation client; no disruption...
...跟踪器与现有自动化客户端并行运行;无干扰...
node scripts/stop-capture.mjs mid-flight-debug
node scripts/bisect-cdp.mjs mid-flight-debug
node scripts/bb-finalize.mjs mid-flight-debug # without --release: leave the session running
undefinednode scripts/stop-capture.mjs mid-flight-debug
node scripts/bisect-cdp.mjs mid-flight-debug
node scripts/bb-finalize.mjs mid-flight-debug # 不带--release:保持会话运行
undefinedWhat you get from the Browserbase platform
从Browserbase平台获取的内容
bb-capture.mjsbrowserbasemanifest.jsonbb-finalize.mjs- — final
<run>/browserbase/session.jsonsnapshot (proxyBytes, status, ended_at, viewport, …)browse cloud sessions get - —
<run>/browserbase/logs.jsonoutput. Often empty. The CDP firehose inbrowse cloud sessions logsis the source of truth; this is a side channel.cdp/raw.ndjson - — files the session downloaded, if any (the script discards the empty 22-byte zip you get when there are none)
<run>/browserbase/downloads.zip
Session replay artifact fetching is deprecated and isn't fetched. Use the screenshots + DOM dumps in and for visual ground truth.
screenshots/dom/The live in the manifest opens an interactive Chrome DevTools view served by Browserbase — handy for watching a long-running automation while the tracer captures the firehose to disk.
debugger_urlbb-capture.mjsmanifest.jsonbrowserbasebb-finalize.mjs- ——
<run>/browserbase/session.json的最终快照(proxyBytes、状态、结束时间、视口等)browse cloud sessions get - ——
<run>/browserbase/logs.json的输出。通常为空。browse cloud sessions logs中的CDP事件流是真实数据源;这只是一个辅助渠道。cdp/raw.ndjson - —— 会话下载的文件(如果有;脚本会丢弃无文件时生成的22字节空压缩包)
<run>/browserbase/downloads.zip
会话重放制品的获取已被弃用,不会被拉取。请使用中的截图和中的DOM转储作为视觉依据。
screenshots/dom/manifest中的实时会打开由Browserbase提供的交互式Chrome DevTools视图——便于在跟踪器将事件流捕获到磁盘时,查看长时间运行的自动化任务。
debugger_urlFilesystem layout
文件系统结构
.o11y/<run-id>/
manifest.json run metadata: target, domains, started_at, stopped_at
index.jsonl one line per sample: {ts, screenshot, dom, url}
cdp/
raw.ndjson full CDP firehose (one JSON object per line)
summary.json {sessionId, duration, totalEvents, pages[]} — see shape below
network/{requests,responses,finished,failed,websocket}.jsonl session-wide buckets (always written)
console/{logs,exceptions}.jsonl
runtime/all.jsonl
log/entries.jsonl
page/{navigations,lifecycle,frames,dialogs,all}.jsonl
dom/all.jsonl (only if O11Y_DOMAINS includes DOM)
target/{attached,detached}.jsonl
pages/ per-page slices, indexed by top-level frameNavigated boundaries
000/ first concrete page
url.txt the URL for this page
summary.json this page's domains/network/timing block (same shape as a pages[] entry)
raw.jsonl firehose scoped to this page
network/, console/, page/, runtime/, log/, target/, dom/ same buckets, only non-empty files
screenshots/<iso-ts>.png one PNG per sample interval
dom/<iso-ts>.html one HTML dump per sample interval
browserbase/ added by bb-finalize.mjs (Browserbase runs only)
session.json final `browse cloud sessions get` snapshot (proxyBytes, status, ended_at, …)
logs.json `browse cloud sessions logs` output (often [])
downloads.zip `browse cloud sessions downloads get` output (only if the session downloaded files)When a run was started via , also carries a top-level block: , , , , , , .
bb-capture.mjsmanifest.jsonbrowserbasesession_idproject_idregionstarted_atexpires_atkeep_alivedebugger_url.o11y/<run-id>/
manifest.json 运行元数据:目标、域、启动时间、停止时间
index.jsonl 每个采样对应一行:{ts, screenshot, dom, url}
cdp/
raw.ndjson 完整CDP事件流(每行一个JSON对象)
summary.json {sessionId, duration, totalEvents, pages[]} —— 结构如下
network/{requests,responses,finished,failed,websocket}.jsonl 会话级分组(始终生成)
console/{logs,exceptions}.jsonl
runtime/all.jsonl
log/entries.jsonl
page/{navigations,lifecycle,frames,dialogs,all}.jsonl
dom/all.jsonl (仅当O11Y_DOMAINS包含DOM时生成)
target/{attached,detached}.jsonl
pages/ 按页面分割的内容,以顶层frameNavigated事件为边界索引
000/ 第一个具体页面
url.txt 此页面的URL
summary.json 此页面的域/网络/计时块(结构与pages[]条目相同)
raw.jsonl 限定于此页面的事件流
network/, console/, page/, runtime/, log/, target/, dom/ 相同分组,仅生成非空文件
screenshots/<iso-ts>.png 每个采样间隔对应一张PNG截图
dom/<iso-ts>.html 每个采样间隔对应一份HTML转储
browserbase/ 仅在Browserbase运行时由bb-finalize.mjs添加
session.json `browse cloud sessions get`的最终快照(proxyBytes、状态、结束时间等)
logs.json `browse cloud sessions logs`的输出(通常为[])
downloads.zip `browse cloud sessions downloads get`的输出(仅当会话有下载文件时生成)当通过启动运行时,还会包含顶层块:、、、、、、。
bb-capture.mjsmanifest.jsonbrowserbasesession_idproject_idregionstarted_atexpires_atkeep_alivedebugger_urlSummary shape
摘要结构
cdp/summary.jsonpages[]Page.frameNavigatedjson
{
"sessionId": "45f28023-…",
"duration": { "startMs": 1777312533000, "endMs": 1777312609000, "totalMs": 76000 },
"totalEvents": 420,
"pages": [
{
"pageId": 0,
"url": "https://example.com/",
"startMs": 1777312533000, "endMs": 1777312538886, "durationMs": 5886,
"eventCount": 60,
"domains": {
"Network": { "count": 18, "errors": 1 },
"Console": { "count": 2 },
"Page": { "count": 24 },
"Runtime": { "count": 13 }
},
"network": { "requests": 4, "failed": 1, "byType": { "Document": 2, "Script": 1, "Other": 1 } }
}
]
}startMsendMsdurationMsmanifest.started_atdomains[*]errorswarningscdp/summary.jsonPage.frameNavigatedpages[]json
{
"sessionId": "45f28023-…",
"duration": { "startMs": 1777312533000, "endMs": 1777312609000, "totalMs": 76000 },
"totalEvents": 420,
"pages": [
{
"pageId": 0,
"url": "https://example.com/",
"startMs": 1777312533000, "endMs": 1777312538886, "durationMs": 5886,
"eventCount": 60,
"domains": {
"Network": { "count": 18, "errors": 1 },
"Console": { "count": 2 },
"Page": { "count": 24 },
"Runtime": { "count": 13 }
},
"network": { "requests": 4, "failed": 1, "byType": { "Document": 2, "Script": 1, "Other": 1 } }
}
]
}startMsendMsdurationMsmanifest.started_aterrorswarningsdomains[*]Drilling in with query.mjs
query.mjs使用query.mjs
深入分析
query.mjsFor interactive exploration, use instead of remembering paths:
scripts/query.mjs <run-id> <command>bash
node scripts/query.mjs my-run list # one-line table of pages
node scripts/query.mjs my-run page 1 # full summary for page 1
node scripts/query.mjs my-run page 1 network/failed # cat failed.jsonl for page 1
node scripts/query.mjs my-run errors # all errors across pages, attributed by pid
node scripts/query.mjs my-run errors 2 # errors from page 2 only
node scripts/query.mjs my-run hosts # top hosts by request count
node scripts/query.mjs my-run host api.example.com # all requests/responses for a host
node scripts/query.mjs my-run summary # full summary.jsonBehind the scenes it just reads and the tree — feel free to bypass it with raw / once you know the shape.
cdp/summary.jsoncdp/pages/<pid>/jqrg对于交互式探索,使用代替手动记忆路径:
scripts/query.mjs <run-id> <command>bash
node scripts/query.mjs my-run list 页面的单行表格
node scripts/query.mjs my-run page 1 页面1的完整摘要
node scripts/query.mjs my-run page 1 network/failed 页面1的failed.jsonl内容
node scripts/query.mjs my-run errors 所有页面的错误,按页面ID归类
node scripts/query.mjs my-run errors 2 仅页面2的错误
node scripts/query.mjs my-run hosts 按请求数排序的顶级主机
node scripts/query.mjs my-run host api.example.com 某主机的所有请求/响应
node scripts/query.mjs my-run summary 完整的summary.json内容它实际上只是读取和目录结构——熟悉结构后,你可以直接使用/绕过它。
cdp/summary.jsoncdp/pages/<pid>/jqrgTop traversal recipes
常用遍历示例
bash
undefinedbash
undefinedAll failed network requests (use jq -c to keep it line-delimited)
所有失败的网络请求(使用jq -c保持行分隔格式)
jq -c '.params' .o11y/<run>/cdp/network/failed.jsonl
jq -c '.params' .o11y/<run>/cdp/network/failed.jsonl
Find requests to a specific host
查找特定主机的请求
jq -c 'select(.params.request.url | test("api\.example\.com"))'
.o11y/<run>/cdp/network/requests.jsonl
.o11y/<run>/cdp/network/requests.jsonl
jq -c 'select(.params.request.url | test("api\.example\.com"))'
.o11y/<run>/cdp/network/requests.jsonl
.o11y/<run>/cdp/network/requests.jsonl
4xx/5xx responses
4xx/5xx响应
jq -c 'select(.params.response.status >= 400)
| {status: .params.response.status, url: .params.response.url}'
.o11y/<run>/cdp/network/responses.jsonl
.o11y/<run>/cdp/network/responses.jsonl
jq -c 'select(.params.response.status >= 400)
| {status: .params.response.status, url: .params.response.url}'
.o11y/<run>/cdp/network/responses.jsonl
.o11y/<run>/cdp/network/responses.jsonl
Console errors only
仅控制台错误
jq -c 'select(.params.type == "error")' .o11y/<run>/cdp/console/logs.jsonl
jq -c 'select(.params.type == "error")' .o11y/<run>/cdp/console/logs.jsonl
Sequence of URLs visited
访问过的URL序列
jq -r '.params.frame.url' .o11y/<run>/cdp/page/navigations.jsonl
jq -r '.params.frame.url' .o11y/<run>/cdp/page/navigations.jsonl
Find the screenshot taken closest to a timestamp (e.g., when an exception fired)
查找最接近某个时间戳的截图(例如异常触发时)
ls .o11y/<run>/screenshots/ | sort | awk -v t=20260427T1714123NZ '
$0 >= t { print; exit }'
See **REFERENCE.md** for the full jq recipe library and a method-by-method bisect map. See **EXAMPLES.md** for end-to-end debug scenarios.ls .o11y/<run>/screenshots/ | sort | awk -v t=20260427T1714123NZ '
$0 >= t { print; exit }'
完整的jq示例库和按方法分割的映射请参见**REFERENCE.md**。端到端调试场景请参见**EXAMPLES.md**。Best practices
最佳实践
- Use on Browserbase: it enforces
bb-capture.mjs, fetches the connectUrl, captures the debugger URL, and stamps the manifest. Doing it manually invites mistakes.--keep-alive - Don't a session you don't own:
--releaseis for sessions you created withbb-finalize.mjs --release. When attaching to a production session via--new, runbb-capture.mjs <session-id>withoutbb-finalize.mjsso the original automation keeps running.--release - Order matters for remote: on Browserbase, attach the main automation client before (or together with) the tracer, and create the session with . Otherwise the session ends as soon as the tracer's WS closes.
--keep-alive - Don't poll faster than ~1s: each sample runs browser CLI read commands and screenshots Chrome. 2s is a good default.
- Pick domains deliberately: defaults () cover most debugging. Add
Network Console Runtime Log Pagefor DOM-tree mutations (very noisy) viaDOM.O11Y_DOMAINS="$O11Y_DOMAINS DOM" - Reuse one Browserbase session for the automation client on remote by attaching to that session's with
connectUrl. Thebrowse open ... --cdp "$CONNECT_URL" --session <name>flag names the local browse daemon; it is not a Browserbase session attach flag.--session - Always run , even after a crash, so background processes don't linger and the manifest gets
stop-capture.mjs.stopped_at - Bisect once per run: is idempotent — it overwrites the per-bucket files from
bisect-cdp.mjseach time.raw.ndjson
- 在Browserbase上使用:它会强制执行
bb-capture.mjs、获取connectUrl、捕获调试URL并标记manifest。手动操作容易出错。--keep-alive - 不要不属于你的会话:
--release仅适用于你用bb-finalize.mjs --release创建的会话。当通过--new附加到生产会话时,运行bb-capture.mjs <session-id>时不要加bb-finalize.mjs,以便原自动化程序继续运行。--release - 远程环境下顺序很重要:在Browserbase上,先附加主自动化客户端(或与跟踪器同时附加),并使用创建会话。否则,跟踪器的WebSocket关闭后会话会立即结束。
--keep-alive - 轮询间隔不要快于~1秒:每个采样都会运行浏览器CLI读取命令和截图操作。2秒是合适的默认值。
- 谨慎选择域:默认值(Network Console Runtime Log Page)覆盖大多数调试场景。若需要DOM树变更跟踪(非常嘈杂),可通过添加
O11Y_DOMAINS="$O11Y_DOMAINS DOM"域。DOM - 远程环境下复用同一个Browserbase会话:通过附加到该会话的
browse open ... --cdp "$CONNECT_URL" --session <name>。connectUrl标志用于命名本地browse守护进程,并非Browserbase会话附加标志。--session - 始终运行:即使崩溃后也要运行,避免后台进程残留,并为manifest添加
stop-capture.mjs字段。stopped_at - 每次运行仅分割一次:是幂等的——每次运行都会从
bisect-cdp.mjs覆盖分组文件。raw.ndjson
Troubleshooting
故障排除
- : usually means the target is unreachable (wrong port) or the Browserbase session has already ended. For remote, verify with
browse cdp exited immediately— ifbrowse cloud sessions get <id>isstatus, recreate withCOMPLETEDand attach automation first.--keep-alive - Empty even though processes are running: confirm a CDP client is actually driving the page. The tracer only emits events that the browser generates, so an idle browser produces ~5 lines of attach/discover messages and nothing else.
raw.ndjson - Screenshots all look identical: check — if
index.jsonldoesn't change, the page hasn't navigated yet. The polling loop runs independently of the main automation's pace.url - Browserbase session ends mid-run: it likely hit . Recreate with a higher timeout (
--timeout) or remove the timeout flag.BB_SESSION_TIMEOUT=1800 node scripts/bb-capture.mjs --new ... - says "not RUNNING": the session you tried to attach to ended. List candidates with
bb-capture.mjs <id>and try again.browse cloud sessions list | jq '.[] | select(.status == "RUNNING")' - is empty
browserbase/logs.json: expected —[]is sparse in practice. The CDP firehose inbrowse cloud sessions logsis the source of truth.cdp/raw.ndjson - Where's the session recording (rrweb)?: session replay artifact fetching is deprecated; this skill doesn't fetch it. Use the screenshot stream in and DOM dumps in
screenshots/.dom/
For full reference, see REFERENCE.md.
For example debug runs, see EXAMPLES.md.
- :通常意味着目标不可达(端口错误)或Browserbase会话已结束。对于远程会话,使用
browse cdp exited immediately验证——如果browse cloud sessions get <id>为status,请使用COMPLETED重新创建并先附加自动化程序。--keep-alive - 进程运行但为空:确认CDP客户端确实在驱动页面。跟踪器仅会输出浏览器生成的事件,因此空闲浏览器只会生成约5行附加/发现消息,无其他内容。
raw.ndjson - 所有截图看起来都一样:检查——如果
index.jsonl没有变化,说明页面尚未导航。轮询循环独立于主自动化程序的运行节奏。url - Browserbase会话中途结束:可能是触发了。使用更高的超时时间重新创建(
--timeout)或移除超时标志。BB_SESSION_TIMEOUT=1800 node scripts/bb-capture.mjs --new ... - 提示"not RUNNING":你尝试附加的会话已结束。使用
bb-capture.mjs <id>列出候选会话并重试。browse cloud sessions list | jq '.[] | select(.status == "RUNNING")' - 为空
browserbase/logs.json:这是正常情况——[]在实际使用中内容很少。browse cloud sessions logs中的CDP事件流是真实数据源。cdp/raw.ndjson - 会话录制(rrweb)在哪里?:会话重放制品的获取已被弃用;此技能不会拉取它。请使用中的截图流和
screenshots/中的DOM转储。dom/
完整参考请参见REFERENCE.md。
示例调试运行请参见EXAMPLES.md。