with one click
debugger
负责排查:查日志、查运行时、定位问题原因,也包括模拟器相关的状态检查与刷新。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
负责排查:查日志、查运行时、定位问题原因,也包括模拟器相关的状态检查与刷新。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
微信开发者工具 任务执行的根入口。用于在执行前先完成环境检查,再路由到预览、自动化、调试与云相关操作。
负责页面操作:点击、输入、滚动、截图、验证。
负责云操作:云环境、云函数、云数据库、云存储。
负责编译:项目编译、单文件编译、编译到指定页面、构建 npm、刷新模拟器。
初始化 微信开发者工具 开发环境与基础信息。用于项目窗口打开或接管、登录信息获取、AppID 信息获取以及运行时上下文读取。
负责预览和发布:推送手机预览、生成预览码、真机预览、上传代码包。
| name | debugger |
| description | 负责排查:查日志、查运行时、定位问题原因,也包括模拟器相关的状态检查与刷新。 |
这个 scene 用来排查当前小程序项目里的问题,并给出下一步处理方向。
适合场景:
对小程序 console 缓冲区执行 grep 过滤并返回命中行。
wechatide -c <clientName> -t get_app_console_content --project <project> --command "grep -i error"
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
command | string | 是 | grep 命令字符串(不含文件名) |
command 用法:
"grep -n .""grep -i error""grep -n warn""grep -i 'your keyword'"注意:不要传 "all" 等枚举值,必须是合法的 grep 命令。返回空字符串代表没有匹配行,不代表 console 为空。
对小程序 network 缓冲区执行 grep 过滤并返回命中行。
wechatide -c <clientName> -t get_app_network_content --project <project> --command "grep -n ."
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
command | string | 是 | grep 命令字符串(不含文件名) |
command 用法:
"grep -n .""grep -i fail""grep -i '/api/xxx'"获取 pageStack、currentPage 或 systemInfo。
wechatide -c <clientName> -t automation_runtime_info --project <project> --action currentPage
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
action | string | 是 | pageStack、currentPage、systemInfo |
调用、mock 或恢复 wx API。
wechatide -c <clientName> -t automation_wx_api --project <project> --action call --method getSystemInfo
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
action | string | 是 | call、mock、restore |
method | string | 是 | wx API 方法名(如 "getSystemInfo") |
args | array | 否 | 调用参数;CLI 使用 --args-file |
result | object | 否 | mock 返回值;CLI 使用 --result-file |
functionDeclaration | string | 否 | mock 函数声明 |
触发模拟器重编译刷新。返回 success: true 只表示刷新动作已触发,不代表编译通过;需要验证编译结果时,应按场景单独调用完整编译或单文件编译工具。
wechatide -c <clientName> -t simulator_refresh --project <project>
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
清理项目缓存,支持细粒度操作。
wechatide -c <clientName> -t debug_clear_cache --project <project> --action cleanAll
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
project | string | 是 | 项目本地绝对路径 |
action | string | 是 | 缓存操作类型 |
| 用户意图 | 选择 |
|---|---|
| "给我看报错日志" | get_app_console_content(command: "grep -i error") |
| "接口为什么没回来" | get_app_network_content(command: "grep -n .") |
| "项目是不是没跑起来" | automation_runtime_info(action: "currentPage") |
| "怀疑是 wx API 行为不对" | automation_wx_api |
| "模拟器像卡住了" | simulator_refresh,然后重新采证 |
| "清一下缓存再试" | debug_clear_cache |
以下情况适合在这个 scene 中使用模拟器相关能力:
推荐做法:
simulator_refresh。automation_runtime_info、页面状态或相关日志。排查时可以先按下面几类理解:
runtime-exception:运行时报错、页面逻辑异常、状态不一致network-failure:请求失败、接口超时、返回异常preview-blocked:预览流程无法继续、二维码或真机预览异常automation-mismatch:自动化动作执行了,但页面结果不符合预期environment-not-ready:项目没接上、运行时不可读、环境前提没补齐simulator-state-error:模拟器没刷新、运行态卡住、重启前后表现明显不同建议至少说明这些内容:
summaryissueClasssymptomevidencelikelyCauserecoveryPathnextActionssimulator_refresh 适合用于验证和恢复当前运行态,但不要无差别反复执行;它的成功返回不能当作编译结果