Skip to main content

控制台

🌐 Console

访问浏览器控制台输出以进行调试。控制台工具是核心功能的一部分,并且始终可用。

🌐 Access browser console output for debugging. Console tools are part of the core capability and always available.

browser_console_messages

参数类型必填描述
level字符串最低等级:errorwarninginfodebug。每个等级包含更严重的等级。
→ browser_console_messages

[error] Uncaught TypeError: Cannot read property 'map' of undefined
at app.js:42:15
[warning] Deprecation: 'window.webkitStorageInfo' is deprecated.
[info] App initialized in 234ms
[info] User session restored

→ browser_console_messages { level: "error" }
[error] Uncaught TypeError: Cannot read property 'map' of undefined
at app.js:42:15

browser_console_clear

清除控制台消息缓冲区。

🌐 Clear the console message buffer.

工作流程:调试损坏的页面

🌐 Workflow: debugging a broken page

You: The page looks broken. Check the console for errors.

→ browser_console_messages { level: "error" }
[error] Failed to fetch: GET https://api.example.com/data 404
[error] Uncaught Error: API returned 404

→ // LLM now knows the API endpoint is returning 404
→ // Can mock the route or investigate further