| name | agent-browser-debug |
| version | 1.0.0 |
| description | Browser debugging: execute JavaScript, view console output and page errors,
record traces, and run performance profiling.
|
| allowed-tools | ["Bash","Read"] |
Agent Browser: Debug & Evaluate
Run JavaScript, inspect console output, capture errors, and profile performance.
Execute JavaScript
agent-browser eval "<js>"
agent-browser eval -b "<base64>"
agent-browser eval --stdin
Console Messages
agent-browser console
agent-browser console --clear
Page Errors
agent-browser errors
agent-browser errors --clear
Tracing (Timeline Recording)
agent-browser trace start [path]
agent-browser trace stop [path]
Trace files can be opened in Chrome DevTools (chrome://tracing).
Performance Profiling
agent-browser profiler start
agent-browser profiler stop [path]
Examples
agent-browser eval "JSON.stringify(window.__STORE__.user)"
agent-browser open https://example.com
agent-browser errors
agent-browser console
agent-browser trace start /tmp/trace.json
agent-browser trace stop /tmp/trace.json
agent-browser profiler start
agent-browser click "#heavy-button"
agent-browser wait 5000
agent-browser profiler stop /tmp/profile.json
echo 'document.querySelectorAll("a").length' | agent-browser eval --stdin
Guidelines
- Use
eval for extracting app state or running custom assertions
- Check
errors after page load to catch JavaScript issues
- Use
console to monitor application logging during interactions
- Traces are useful for diagnosing slow page loads or animations
- Save trace/profile files to
/tmp/ for ephemeral debugging