Loading...
Loading...
Compare original and translation side by side
agent-browserSESSIONantithesis-debug-$(date +%s)-$$--session-name antithesisagent-browser--session "$SESSION"agent-browserSESSIONantithesis-debug-$(date +%s)-$$--session-name antithesisagent-browser--session "$SESSION"antithesis-triageagent-browserantithesis-triageagent-browserhttps://TENANT.antithesis.com/debugging-session/...https://TENANT.antithesis.com/debugging-session/...| Mode | Best for | How it works |
|---|---|---|
| Simplified | Running shell commands, reading files, listing directories, extracting artifacts | Click log lines to set moment/container, type bash commands, press Send |
| Advanced | Programmatic inspection, branching, event sets, custom JavaScript, multi-step notebook workflows | Monaco editor with JavaScript cells, action authorization, runtime API |
| 模式 | 适用场景 | 工作方式 |
|---|---|---|
| 简化模式 | 执行Shell命令、读取文件、列出目录、提取工件 | 点击日志行设置时间点/容器,输入Bash命令,按发送键 |
| 高级模式 | 程序化检查、分支操作、事件集查询、自定义JavaScript、多步骤笔记本工作流 | 带JavaScript单元格的Monaco编辑器、操作授权、运行时API |
references/setup-session.mdagent-browser --session "$SESSION" eval \
"window.__antithesisDebug.getMode()""simplified""advanced"agent-browser --session "$SESSION" eval \
'window.__antithesisDebug.switchMode("simplified")'references/setup-session.mdagent-browser --session "$SESSION" eval \
"window.__antithesisDebug.getMode()""simplified""advanced"agent-browser --session "$SESSION" eval \
'window.__antithesisDebug.switchMode("simplified")'moment.branch()environment.events.up_to(moment)references/simplified-debugger.mdmoment.branch()environment.events.up_to(moment)references/simplified-debugger.md| Page | When to read |
|---|---|
| Always — read first to set up the browser session |
| Running commands, extracting files, reading logs in simplified mode |
| 页面 | 阅读时机 |
|---|---|
| 必读——首先阅读以设置浏览器会话 |
| 在简化模式下执行命令、提取文件、读取日志时阅读 |
| Page | When to read |
|---|---|
| Always — read first to set up the browser session |
| Reading or writing notebook source, injecting cells |
| Authorizing shell actions, reading action output |
| Ready-to-use debug cell snippets for common tasks |
| 页面 | 阅读时机 |
|---|---|
| 必读——首先阅读以设置浏览器会话 |
| 读取或编写笔记本源码、注入单元格时阅读 |
| 授权Shell操作、读取操作输出时阅读 |
| 执行常见任务时使用现成的调试单元格代码片段时阅读 |
references/setup-session.mdreferences/simplified-debugger.mdreferences/setup-session.mdreferences/simplified-debugger.mdreferences/setup-session.mdreferences/simplified-debugger.mdreferences/setup-session.mdreferences/simplified-debugger.mdreferences/setup-session.mdwindow.__antithesisDebug.switchMode("advanced")references/notebook.mdreferences/common-inspections.mdreferences/actions.mdreferences/setup-session.mdwindow.__antithesisDebug.switchMode("advanced")references/notebook.mdreferences/common-inspections.mdreferences/actions.mdwindow.__antithesisDebugsimplifiednotebookactionsassets/antithesis-debug.jscat assets/antithesis-debug.js \
| agent-browser --session "$SESSION" eval --stdinwindow.__antithesisDebugagent-browser evalundefinedwindow.__antithesisDebugsimplifiednotebookactionsassets/antithesis-debug.jscat assets/antithesis-debug.js \
| agent-browser --session "$SESSION" eval --stdinwindow.__antithesisDebugagent-browser evalundefined
`agent-browser eval` awaits Promises automatically, so async and sync methods
use the same call pattern.
If `window.__antithesisDebug` is missing, inject `assets/antithesis-debug.js` and retry the method call.
Do not run method calls in parallel with `agent-browser open`, navigation, or
any other command that can replace the page. Wait until the target page is
settled before starting `eval` calls. Run queries sequentially; mutations will
interfere with each other if launched in parallel.
After every `open` call or any interaction that may navigate or replace the
page, first confirm the browser has landed on the debugger page, then inject
`assets/antithesis-debug.js` and call the appropriate `waitForReady()` before
running other methods.
`agent-browser eval`会自动等待Promise完成,因此异步和同步方法使用相同的调用模式。
如果`window.__antithesisDebug`不存在,请注入`assets/antithesis-debug.js`并重试方法调用。
不要在`agent-browser open`、导航或任何可能替换页面的命令并行运行方法调用。等待目标页面加载完成后再开始`eval`调用。按顺序执行查询;如果并行启动,修改操作会相互干扰。
每次执行`open`调用或任何可能导航或替换页面的交互后,首先确认浏览器已加载到调试器页面,然后注入`assets/antithesis-debug.js`,并在运行其他方法前调用相应的`waitForReady()`。waitForReadyundefinedwaitForReadyundefined
Both poll for up to 60 seconds and return `{ ok, ready, attempts, waitedMs }`.
On timeout, the result also includes `details`.
One-shot probes:
```bash
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.simplified.loadingFinished()"
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.notebook.loadingFinished()"agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.simplified.loadingStatus()"
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.notebook.loadingStatus()"
两者都会轮询最多60秒,并返回`{ ok, ready, attempts, waitedMs }`。超时后,结果还会包含`details`。
一次性探测:
```bash
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.simplified.loadingFinished()"
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.notebook.loadingFinished()"agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.simplified.loadingStatus()"
agent-browser --session "$SESSION" eval \
"window.__antithesisDebug.notebook.loadingStatus()"antithesis-triagereferences/setup-auth.md--session-name antithesisSESSION--session-name antithesisagent-browser --session "$SESSION" closeenvironment.containers.list({moment})antithesis-triagereferences/setup-auth.md--session-name antithesisSESSION--session-name antithesisagent-browser --session "$SESSION" closeenvironment.containers.list({moment})openassets/antithesis-debug.jsnotebook.waitForReady()window.__antithesisDebugbash\openassets/antithesis-debug.jsnotebook.waitForReady()window.__antithesisDebugbash\