Loading...
Loading...
Compare original and translation side by side
pip install uv # 如未安装 uv
uv tool install wechat-devtools-mcp --force # 通过uv安装wechat-devtools-mcp{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}主流编辑器配置见 README.md
[!IMPORTANT] 必须手动开启开发者工具的服务端口:→设置→安全设置→服务端口。未开启将导致所有 CLI 操作报开启。CLI_TIMEOUT
pip install uv # Install uv if not present
uv tool install wechat-devtools-mcp --force # Install wechat-devtools-mcp via uv{
"mcpServers": {
"wechat-devtools": {
"command": "uvx",
"args": ["wechat-devtools-mcp"],
"env": {
"WECHAT_DEVTOOLS_CLI": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat",
"WECHAT_PROJECT_PATH": "D:\\Your\\Project\\Path"
}
}
}
}See README.md for mainstream editor configurations
[!IMPORTANT] You must manually enable the service port of the developer tools:→Settings→Security Settings→Service Port. Failure to enable will cause all CLI operations to reportEnable.CLI_TIMEOUT
首先调用一次性确认所有前置条件。wechat_ide(action='status')
| 检查项 | 偏好命令 | 失败时操作 |
|---|---|---|
| CLI 已安装 | | 安装工具并配置 |
| 项目路径已配置 | | 配置 |
| 已登录 | | |
| Node.js 可用 | | 安装 Node.js ≥ 8.0 |
First callto verify all prerequisites at once.wechat_ide(action='status')
| Check Item | Preferred Command | Action on Failure |
|---|---|---|
| CLI Installed | | Install the tool and configure |
| Project Path Configured | | Configure |
| Logged In | | |
| Node.js Available | | Install Node.js ≥ 8.0 |
IDE 只在会话开始时 open 一次,compile 只在代码变更后执行,页面跳转优先用 evaluate 而非 navigate。
| 场景 | 正确做法 | 错误做法 |
|---|---|---|
| 没改代码,换页面测试 | | 重新 open → compile |
| 改了代码 | | 重新 open → compile |
| 连接断开 | 先快速恢复(仅 | 直接走完整恢复 |
The IDE is opened only once at the start of the session, compile is executed only after code changes, and page navigation uses evaluate preferentially over navigate.
| Scenario | Correct Practice | Incorrect Practice |
|---|---|---|
| Testing different pages without code changes | | Re-open → compile |
| Code changed | | Re-open → compile |
| Connection disconnected | Quick recovery first (only | Directly perform full recovery |
wechat_idewechat_ide| action | 功能 | 关键参数 |
|---|---|---|
| 打开 IDE/项目(cdp_enabled 时自动做启动健康检查) | |
| 扫码登录 | |
| 检查登录状态 | — |
| 关闭项目 / 退出 IDE | — |
| 环境诊断 | — |
| action | Function | Key Parameters |
|---|---|---|
| Open IDE/project (automatically performs startup health check when cdp_enabled) | |
| QR code login | |
| Check login status | — |
| Close project / Exit IDE | — |
| Environment diagnosis | — |
wechat_buildwechat_build| action | 功能 | 关键参数 |
|---|---|---|
| 编译检查(捕获错误/警告,成功后自动重连 automator) | — |
previewqr_format="terminal"uploadversiondesc?build_npmcache_cleanclean_type="compile"| action | Function | Key Parameters |
|---|---|---|
| Compilation check (captures errors/warnings, automatically reconnects automator after success) | — |
previewqr_format="terminal"uploadversiondesc?build_npmcache_cleanclean_type="compile"wechat_automatorwechat_automator前提:先调用开启自动化端口(整个会话仅需一次)。start
| action | 功能 | 必填参数 |
|---|---|---|
| 开启自动化端口 | — |
| 点击元素 | |
| 输入文本 | |
| 获取元素详情(文本/尺寸/WXML) | |
| 热更新页面 data(无需重编译) | |
| 调用页面方法 | |
| 调用 wx API | |
| Mock wx API 返回值 | |
| 执行 JS 表达式(逻辑层万能钥匙) | |
page_stackpage_dataexpected_path?system_infostoragekey?Prerequisite: Callfirst to enable the automation port (only required once per session).start
| action | Function | Required Parameters |
|---|---|---|
| Enable automation port | — |
| Click element | |
| Input text | |
| Get element details (text/size/WXML) | |
| Hot update page data (no recompilation needed) | |
| Call page method | |
| Call wx API | |
| Mock wx API return value | |
| Execute JS expression (universal key for logic layer) | |
page_stackpage_dataexpected_path?system_infostoragekey?wechat_inspectorwechat_inspector| action | 功能 | 关键参数 |
|---|---|---|
| 采集 console 日志和 JS 异常 | |
| CDP 协议采集底层日志(WXML/渲染层) | |
cdp 前提:以打开项目,确保端口 9222 可用。cdp_enabled=true
| action | Function | Key Parameters |
|---|---|---|
| Collect console logs and JS exceptions | |
| Collect underlying logs via CDP protocol (WXML/rendering layer) | |
CDP Prerequisite: Open the project withand ensure port 9222 is available.cdp_enabled=true
wechat_screenshotwechat_screenshotoutput_pathscreenshots/full_pagetruefalsescroll_topfull_page=falsepage_pathwechat_automator(action='start')scroll-view<project>/screenshots/.claude/image-cache/output_pathscreenshots/full_pagetruefalsescroll_topfull_page=falsepage_pathwechat_automator(action='start')scroll-viewpage_data<project>/screenshots/.claude/image-cache/wechat_navigatewechat_navigatepage_pathpages/index/indexwait_msclear_logstruecheck_datatruedetail_levelconcisefullswitchTabreLaunchnavigation_methodautomator startcdp_enabled=truepage_pathpages/index/indexwait_msclear_logstruecheck_datatruedetail_levelconcisefullswitchTabreLaunchnavigation_methodautomator startcdp_enabled=truewechat_filewechat_file| action | 功能 | 必填参数 |
|---|---|---|
| 项目完整信息(app.json + 目录结构) | — |
| 所有页面列表(含文件完整性检查) | — |
| 读取页面源码(wxml/wxss/js/json) | |
| 读取任意单文件(最多 800 行) | |
云函数与云数据库管理:本 MCP 自 v0.9.5 起不再提供工具。请改用 CloudBase MCP(wechat_cloud/manageFunctions/readNoSqlDatabaseContent等),无 IDE 依赖且覆盖更完整。writeNoSqlDatabaseContent
| action | Function | Required Parameters |
|---|---|---|
| Get complete project information (app.json + directory structure) | — |
| Get all page list (including file integrity check) | — |
| Read page source code (wxml/wxss/js/json) | |
| Read any single file (max 800 lines) | |
Cloud Function and Cloud Database Management: This MCP no longer providestools since v0.9.5. Please use CloudBase MCP instead (withwechat_cloud/manageFunctions/readNoSqlDatabaseContentetc.), which has no IDE dependency and covers more features.writeNoSqlDatabaseContent
wechat_ide(action='status') # 诊断环境
wechat_ide(action='is_login') # 检查登录
↳ 未登录: wechat_ide(action='login', qr_format='terminal')
wechat_ide(action='open', cdp_enabled=True) # 开启 IDE + CDP 9222 + 自动健康检查
↳ 返回 success=false + startup_errors → 小程序启动阶段有致命错误,必须先修复再继续
↳ 返回 success=true → 启动正常,继续后续步骤
↳ IDE 冷启动可能出现瞬态错误(simulator not found / subPackages of undefined),属正常现象,忽略并继续执行 compile 即可刷新
wechat_automator(action='start') # 启动 daemon + 开启自动化 9420
wechat_file(action='project_info') # [可选] 确认项目结构
wechat_build(action='cache_clean', clean_type='all') # 清除全部缓存
wechat_build(action='compile') # 编译建立干净 CDP 基线(自动重连 automator)
wechat_automator(action='page_data') # 验证连接可用
↳ ⚠ 检查输出中 AppID 是否为 undefined
↳ 如果 undefined → project_path 可能指向了子目录而非项目根目录
↳ 云开发项目根目录包含 project.config.json、miniprogram/ 和 cloudfunctions/
↳ 正确: project_path="D:/MyProject" 错误: project_path="D:/MyProject/miniprogram"project_path 规则:必须指向包含的根目录。云开发项目的project.config.json是子目录,不能作为 project_path。miniprogram/
wechat_ide(action='status') # Diagnose environment
wechat_ide(action='is_login') # Check login status
↳ Not logged in: wechat_ide(action='login', qr_format='terminal')
wechat_ide(action='open', cdp_enabled=True) # Launch IDE + CDP 9222 + automatic health check
↳ Returns success=false + startup_errors → Fatal error during mini program startup, must fix before proceeding
↳ Returns success=true → Startup normal, proceed to next steps
↳ Transient errors may occur during IDE cold start (simulator not found / subPackages of undefined), which is normal, ignore and continue to execute compile to refresh
wechat_automator(action='start') # Launch daemon + enable automation port 9420
wechat_file(action='project_info') # [Optional] Confirm project structure
wechat_build(action='cache_clean', clean_type='all') # Clear all cache
wechat_build(action='compile') # Compile to establish clean CDP baseline (automatically reconnects automator)
wechat_automator(action='page_data') # Verify connection availability
↳ ⚠ Check if AppID is undefined in the output
↳ If undefined → project_path may point to a subdirectory instead of the project root
↳ Cloud development project root directory contains project.config.json, miniprogram/ and cloudfunctions/
↳ Correct: project_path="D:/MyProject" Wrong: project_path="D:/MyProject/miniprogram"project_path Rule: Must point to the root directory containing. For cloud development projects,project.config.jsonis a subdirectory and cannot be used as project_path.miniprogram/
wechat_build(action='compile') # 编译(自动重连 automator)
wechat_automator(action='page_data') # 验证连接可用不需要重新 open IDE、不需要 cache_clean。仅在修改了小程序源码后执行。
wechat_build(action='compile') # Compile (automatically reconnects automator)
wechat_automator(action='page_data') # Verify connection availabilityNo need to re-open IDE or perform cache_clean. Only execute after modifying mini program source code.
| 场景 | 方式 |
|---|---|
| 普通页面 | |
| tabBar 页面 | |
| 强制重置 | |
| 跳转后 | |
| Scenario | Method |
|---|---|
| Normal page | |
| TabBar page | |
| Force reset | |
| After navigation | Verify |
wechat_file(action='list_pages') # ⓪ 首次导航前,获取有效页面路径列表
↳ tabBar 页面路径通常是 pages/xxx/index(非 pages/xxx/xxx)
wechat_navigate(page_path='pages/xxx/index', wait_ms=3000) # ① 跳转 + CDP 日志
wechat_automator(action='page_data') # ② 查看 data 状态
↳ ⚠ 必须校验 data.path === 预期的 page_path
↳ 如不匹配 → 页面跳转失败或被重定向(见 page_data 注意事项)
↳ 数据异常: set_data(data_json='{"key":"val"}') 热更新验证
↳ 确认元素: element_info(selector='.target')
↳ 仅在用户要求或需要视觉确认时: wechat_screenshot() # 默认保存到项目 screenshots/wechat_file(action='list_pages') # ⓪ Before first navigation, get list of valid page paths
↳ TabBar page paths are usually pages/xxx/index (not pages/xxx/xxx)
wechat_navigate(page_path='pages/xxx/index', wait_ms=3000) # ① Navigate + CDP logs
wechat_automator(action='page_data') # ② Check data status
↳ ⚠ Must verify that data.path === expected page_path
↳ If not matching → Page navigation failed or redirected (see page_data notes)
↳ Data exception: set_data(data_json='{"key":"val"}') to hot update and verify
↳ Confirm element: element_info(selector='.target')
↳ Only when requested by user or visual confirmation is needed: wechat_screenshot() # Default saves to project screenshots/wechat_automator(action='page_data') # ① 首选:直接检查页面数据
↳ 关键字段为 null/空 → 数据未加载或参数错误
↳ 数据正常 → 跳到步骤 ④ 确认非数据问题
wechat_automator(action='evaluate', expression='wx.cloud.callFunction({name:"xxx",data:{...}})')
# ② 直接调 API 获取完整返回值
↳ 遇到 [object Object] 时必用此步骤,可拿到完整 JSON
wechat_inspector(action='cdp', duration=5, detail_level='concise')
# ③ CDP 辅助参考
⚠ CDP 错误计数可能包含历史缓存,以 page_data 为准
wechat_build(action='compile') # ④ 捕获编译错误
↳ 检查 wxml_errors 字段;⚠ 中文引号 "" 等编译错误工具无法捕获wechat_automator(action='page_data') # ① Preferred: Directly check page data
↳ Key fields are null/empty → Data not loaded or parameter error
↳ Data normal → Proceed to step ④ to confirm it's not a data issue
wechat_automator(action='evaluate', expression='wx.cloud.callFunction({name:"xxx",data:{...}})')
# ② Directly call API to get complete return value
↳ Must use this step when encountering [object Object] to get complete JSON
wechat_inspector(action='cdp', duration=5, detail_level='concise')
# ③ CDP auxiliary reference
⚠ CDP error count may include historical cache, rely on page_data instead
wechat_build(action='compile') # ④ Capture compilation errors
↳ Check wxml_errors field; ⚠ Compilation errors like Chinese quotes "" cannot be captured by the toolwechat_build(action='cache_clean', clean_type='all') # 建立干净 CDP 基线
wechat_build(action='compile')
↳ ⚠ 检查 AppID 是否为 undefined
wechat_file(action='list_pages') # 获取页面列表,确认有效路径wechat_build(action='cache_clean', clean_type='all') # Establish clean CDP baseline
wechat_build(action='compile')
↳ ⚠ Check if AppID is undefined
wechat_file(action='list_pages') # Get page list, confirm valid pathsundefinedundefinedwechat_automator(action='mock_wx', method='requestPayment', result_json='{"errMsg":"requestPayment:ok"}')
wechat_automator(action='mock_wx', method='getUserProfile', result_json='{"userInfo":{"nickName":"测试用户"}}')
wechat_automator(action='mock_wx', method='getLocation', result_json='{"latitude":23.099,"longitude":113.324}')
wechat_automator(action='tap', selector='.pay-btn') # 触发交互
wechat_automator(action='page_data') # 验证 data 变化Mock 仅当前会话有效,重启 IDE 后需重新设置。
wechat_automator(action='mock_wx', method='requestPayment', result_json='{"errMsg":"requestPayment:ok"}')
wechat_automator(action='mock_wx', method='getUserProfile', result_json='{"userInfo":{"nickName":"Test User"}}')
wechat_automator(action='mock_wx', method='getLocation', result_json='{"latitude":23.099,"longitude":113.324}')
wechat_automator(action='tap', selector='.pay-btn') # Trigger interaction
wechat_automator(action='page_data') # Verify data changesMock is only valid for the current session, needs to be reset after restarting IDE.
undefinedundefined
**② UI 适配测试**
undefined
**② UI Adaptation Testing**
undefinedwechat_file(action='read_page', page_path='pages/xxx/xxx') # ① 查看 onLoad 方法
↳ 从 options 参数中确认 query 参数名(如 id / matchId)
wechat_navigate(page_path='pages/xxx/xxx?正确参数名=值', wait_ms=3000) # ② 跳转
wechat_automator(action='page_data') # ③ 验证数据
↳ 关键字段非空 → ✅
↳ 大部分为 null → 参数名可能有误,回到 ①wechat_file(action='read_page', page_path='pages/xxx/xxx') # ① Check onLoad method
↳ Confirm query parameter names (such as id / matchId) from options parameter
wechat_navigate(page_path='pages/xxx/xxx?correct_param_name=value', wait_ms=3000) # ② Navigate
wechat_automator(action='page_data') # ③ Verify data
↳ Key fields not empty → ✅
↳ Most fields are null → Parameter name may be incorrect, go back to ①wechat_file(action='list_pages') # ① 获取页面列表wechat_file(action='list_pages') # ① Get page listundefinedundefinedundefinedundefined
> **端口独占规则**:automator 9420 端口是独占的,同一时刻只能有一个 Agent 操作 WeChat MCP。Playwright 和 WeChat MCP 可同时使用(不同端口)。
---
> **Port Exclusivity Rule**: The automator port 9420 is exclusive, only one Agent can operate WeChat MCP at the same time. Playwright and WeChat MCP can be used simultaneously (different ports).
---concise → 仅 errors + warnings(节省 Token,优先使用)
↓ summary.errors > 0 时
full → 完整日志 + source 定位 → wechat_file(action='read_file', file_path=source)| 场景 | 推荐参数 |
|---|---|
| 快速诊断 | |
| 深度排查 | |
| 页面巡检 | |
重要:CDP 错误计数可能包含跨页面累积的历史日志。v0.4.0 的(默认)会基于时间戳过滤历史日志,但仍建议以clear_logs=true作为最终验证标准。page_data
concise → Only errors + warnings (saves tokens, preferred)
↓ When summary.errors > 0
full → Complete logs + source location → wechat_file(action='read_file', file_path=source)| Scenario | Recommended Parameters |
|---|---|
| Quick diagnosis | |
| In-depth troubleshooting | |
| Page inspection | |
Important: CDP error count may include accumulated historical logs across pages.(default) in v0.4.0 filters historical logs based on timestamp, but it is still recommended to useclear_logs=trueas the final verification standard.page_data
| source 前缀 | 说明 | 处理 |
|---|---|---|
| 开发者工具自身的断言/警告 | 忽略 |
| IDE 扩展注入的提醒 | 区分对待 |
| message 模式 | 说明 |
|---|---|
| devtools 内部断言 |
| 浏览器引擎警告 |
| 废弃 API 迁移提醒 |
| 框架 API 废弃预警 |
| 组件属性类型不匹配警告 |
判断原则:CDP 的 errors/warnings 计数可能被上述噪音抬高,导致误判。始终以返回的实际数据作为最终验证标准。page_data
| source Prefix | Description | Handling |
|---|---|---|
| Assertions/warnings from the developer tool itself | Ignore |
| Reminders injected by IDE extensions | Treat differently |
| message Pattern | Description |
|---|---|
| Internal assertions of devtools |
| Browser engine warning |
| Deprecated API migration reminder |
| Framework API deprecation warning |
| Component property type mismatch warning |
Judgment Principle: The errors/warnings count in CDP may be inflated by the above noise, leading to misjudgment. Always use the actual data returned byas the final verification standard.page_data
data.pathwechat_navigate(page_path='pages/xxx/index', wait_ms=3000)
wechat_automator(action='page_data')
↳ data.path !== 'pages/xxx/index' → 页面未正确加载
↳ 用 page_stack 查看完整页面栈,定位重定向原因data.pathwechat_navigate(page_path='pages/xxx/index', wait_ms=3000)
wechat_automator(action='page_data')
↳ data.path !== 'pages/xxx/index' → Page not loaded correctly
↳ Use page_stack to view complete page stack, locate redirection reason{"success": true, "data": {...}, "message": "操作描述"}
{"success": false, "error_code": "CLI_TIMEOUT", "message": "...", "hint": "修复提示"}
{"success": false, "error_code": "UNKNOWN_ERROR", "message": "小程序启动阶段检测到 N 个错误...", "hint": "...", "startup_errors": [...], "cdp_summary": {...}}| error_code | 含义 | 处理 |
|---|---|---|
| 必填参数缺失 | 查看 hint 字段 |
| 找不到 CLI | 检查 |
| 项目路径未配置 | 检查 |
| Node.js 未安装 | 安装 Node.js ≥ 8.0 |
| CLI 执行超时 | 开启服务端口;重启 IDE |
{"success": true, "data": {...}, "message": "Operation description"}
{"success": false, "error_code": "CLI_TIMEOUT", "message": "...", "hint": "Fix hint"}
{"success": false, "error_code": "UNKNOWN_ERROR", "message": "N errors detected during mini program startup...", "hint": "...", "startup_errors": [...], "cdp_summary": {...}}| error_code | Meaning | Handling |
|---|---|---|
| Required parameter missing | Check hint field |
| CLI not found | Check |
| Project path not configured | Check |
| Node.js not installed | Install Node.js ≥ 8.0 |
| CLI execution timeout | Enable service port; restart IDE |
wechat_automator(action='start') # 仅重连
wechat_automator(action='page_data') # 验证wechat_ide(action='open', cdp_enabled=True) # 重新打开
wechat_automator(action='start') # 重连
wechat_build(action='compile') # 重编译(自动重连 automator)
wechat_automator(action='page_data') # 验证wechat_automator(action='start') # Only reconnect
wechat_automator(action='page_data') # Verifywechat_ide(action='open', cdp_enabled=True) # Re-open
wechat_automator(action='start') # Reconnect
wechat_build(action='compile') # Recompile (automatically reconnects automator)
wechat_automator(action='page_data') # Verify| 症状 | 原因 | 解决 |
|---|---|---|
| CDP 采集失败(9222 无响应) | IDE 未用 cdp_enabled 启动 | |
| 截图空白 / 尺寸 0 | automator 未启动或页面未渲染 | 确认 |
| page_path 拼写错 / 未注册 | |
| 元素被遮挡或在 shadow-root 外 | 检查 WXML 结构,尝试父节点 |
| 逻辑层崩溃 / 正在重载 | 等待 3s 后重试 |
| 服务端口未开启 / IDE 未运行 | 开启服务端口; |
| 元素未找到 | 不在当前页面或 selector 错 | |
| project_path 指向子目录而非项目根目录 | 改为包含 |
| AppID 未配置或未登录 | 检查 project_path + 登录状态 |
| automator WS 连接断开(v0.9.0 daemon 架构下极少出现) | 先快速恢复(仅 |
| automator 未启动或已断开 | 同上 |
| navigate 返回 success 但页面未跳转 | page_path 不存在或拼写错误 | |
| page_data.path 与 navigate 目标不一致 | 页面被重定向(未登录/参数错/云函数失败) | 检查 AppID、登录状态、页面 onLoad 逻辑 |
| CDP errors 计数含 console.assert | devtools 内部噪音 | 过滤 |
| 子页面数据与主页面不一致 | 子页面使用独立数据获取链路 | 用 |
| 长图截图底部导航栏重复出现 | 固定区域检测失败(已在 v0.5.0 修复) | 升级到最新版本;如仍复现请反馈 |
| 小程序启动阶段有致命错误(页面无法显示) | 根据 |
| IDE 冷启动瞬态错误,运行时尚未就绪 | 忽略,继续执行 compile 刷新即可 |
| compile 成功但 IDE 显示红色 WXML 错误 | WXML 编译错误走 IDE 内部通道 | 检查中文引号 |
| wechat_navigate 内部变量作用域 bug(v0.7.0 已修复) | 升级到 v0.7.0;或改用 evaluate + wx.reLaunch |
| compile_condition 入口页被覆盖 | app 路由守卫覆盖编译入口 | 编译默认页,evaluate(wx.reLaunch) 跳转 |
| switchTab ok 但未切换 | switchTab 异步未完成 | 增加 wait_ms;v0.8.0 navigate 已自动处理 TabBar 页面 |
evaluate 报 | v0.6.0 仅支持表达式(v0.7.0 已修复) | 升级到 v0.7.0;或用 IIFE 包裹 |
| 截图看不到弹窗/蒙层 | fixed/absolute overlay 不在同一渲染层 | 以 page_data 为准 |
call_method 报 | v0.6.0 未返回路径(v0.7.0 已修复) | 升级到 v0.7.0;或先 page_data 确认 path |
| navigate TabBar 页面无效 | TabBar 页面不支持 reLaunch/navigateTo | v0.8.0 自动检测并使用 switchTab;或手动 |
| 截图显示错误页面 | screenshot connect 后页面被重置 | 使用 |
| scroll-view 页面长图只有一屏 | automator SDK 无法捕获 scroll-view 内部滚动 | 已知限制,返回 |
| Symptom | Cause | Solution |
|---|---|---|
| CDP collection failed (port 9222 unresponsive) | IDE not started with cdp_enabled | Restart with |
| Blank screenshot / size 0 | automator not started or page not rendered | Confirm |
| page_path spelled incorrectly / not registered | Verify with |
| Element blocked or outside shadow-root | Check WXML structure, try parent node |
| Logic layer crashed / reloading | Retry after waiting 3s |
| Service port not enabled / IDE not running | Enable service port; |
| Element not found | Not on current page or selector wrong | Confirm page with |
| project_path points to subdirectory instead of project root | Change to directory containing |
| AppID not configured or not logged in | Check project_path + login status |
| automator WS connection disconnected (rare under v0.9.0 daemon architecture) | First perform quick recovery (only |
| automator not started or disconnected | Same as above |
| navigate returns success but page not navigated | page_path does not exist or spelled incorrectly | Confirm path with |
| page_data.path does not match navigate target | Page redirected (not logged in/parameter error/cloud function failed) | Check AppID, login status, page onLoad logic |
| CDP errors count includes console.assert | devtools internal noise | Filter |
| Subpage data inconsistent with main page | Subpage uses independent data acquisition link | Use |
| Bottom navigation bar repeated in long screenshot | Fixed area detection failed (fixed in v0.5.0) | Upgrade to latest version; feedback if still reproducible |
| Fatal error during mini program startup (page cannot be displayed) | Fix code according to error details in |
| Transient error during IDE cold start, not ready yet | Ignore, continue to execute compile to refresh |
| compile succeeds but IDE shows red WXML error | WXML compilation errors go through IDE internal channel | Check Chinese quotes |
| Internal variable scope bug in wechat_navigate (fixed in v0.7.0) | Upgrade to v0.7.0; or use evaluate + wx.reLaunch |
| compile_condition entry page overridden | App route guard overrides compilation entry | Compile default page, navigate with evaluate(wx.reLaunch) |
| switchTab ok but not switched | switchTab not completed asynchronously | Increase wait_ms; v0.8.0 navigate automatically handles TabBar pages |
evaluate reports | v0.6.0 only supports expressions (fixed in v0.7.0) | Upgrade to v0.7.0; or wrap with IIFE |
| Pop-ups/masks not visible in screenshot | fixed/absolute overlay not in same rendering layer | Rely on page_data |
call_method reports | v0.6.0 does not return path (fixed in v0.7.0) | Upgrade to v0.7.0; or confirm path with page_data first |
| navigate to TabBar page ineffective | TabBar pages do not support reLaunch/navigateTo | v0.8.0 automatically detects and uses switchTab; or manually |
| Screenshot shows wrong page | Page reset after screenshot connection | Use |
| Long screenshot of scroll-view page only shows one screen | automator SDK cannot capture internal scroll of scroll-view | Known limitation, returns |
Connection closedws://localhost:9420wechat_ide(action='open', project_path='...', cdp_enabled=true) # ① 重新打开项目
wechat_automator(action='start', project_path='...') # ② 重启 automator
wechat_build(action='compile', project_path='...') # ③ 重新编译Connection closedws://localhost:9420wechat_ide(action='open', project_path='...', cdp_enabled=true) # ① Re-open project
wechat_automator(action='start', project_path='...') # ② Restart automator
wechat_build(action='compile', project_path='...') # ③ Recompile
---
---openstartup_errorsis_login: truepreviewuploadcache_clean(clean_type='all')evaluateeval()sleepwait_mspage_datastartpage_datapage_dataminiprogram/page_data.pathdevtools://console.assertwechat_automatorwechat_screenshotoutput_pathscreenshots/automator(action='start')tapinputelement_infouploadbuild_npm[Violation]compile""openstartcompilepage_datapage_stackopenstartup_errorspreviewuploadis_login: truecache_clean(clean_type='all')eval()evaluatesleepwait_mspage_datastartpage_datapage_dataminiprogram/page_data.pathconsole.assertdevtools://wechat_automatoroutput_pathwechat_screenshotscreenshots/automator(action='start')element_infotapinputbuild_npmupload[Violation]compile""openstartcompilepage_datapage_stack