lynx-devtool

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DevTool Skill

DevTool技能

This skill allows you to interact with Lynx applications running on connected devices (Android, iOS, Desktop) using the Lynx DevTool CLI.
该技能允许你使用Lynx DevTool CLI与运行在已连接设备(Android、iOS、桌面端)上的Lynx应用进行交互。

Usage

使用方法

The CLI is located at
<path_to_the_skill>/scripts/index.mjs
relative to this skill's directory. You can run it using
node
.
In the skill directory, use:
bash
node <path_to_the_skill>/scripts/index.mjs <command>
Note: All command outputs are multi-line JSON. You can use
jq
or Node.js to process the data.
CLI位于该技能目录下的
<path_to_the_skill>/scripts/index.mjs
路径,你可以使用
node
运行它。
在技能目录下,执行:
bash
node <path_to_the_skill>/scripts/index.mjs <command>
注意: 所有命令的输出都是多行JSON,你可以使用
jq
或Node.js处理这些数据。

Global Options

全局选项

  • -h, --help
    : Display help for command.
Note: Each subcommand supports the
--help
flag (e.g.
node <path_to_the_skill>/scripts/index.mjs cdp --help
). Use this to view the full list of available arguments and their descriptions.
  • -h, --help
    :显示命令帮助信息。
注意: 每个子命令都支持
--help
参数(例如
node <path_to_the_skill>/scripts/index.mjs cdp --help
),你可以使用该参数查看所有可用参数及其描述的完整列表。

Command List

命令列表

  • Send CDP Command: Send a supported CDP method to a selected session.
  • Send App Command: Send an App-level method to the Lynx app.
  • Open URL: Open a target URL in the Lynx app.
  • Get Sources: List parsed scripts for later debugger operations.
  • Take Screenshot: Capture the current page as a screenshot.
  • 发送CDP命令:向选中的会话发送支持的CDP方法。
  • 发送应用命令:向Lynx应用发送应用级方法。
  • 打开URL:在Lynx应用中打开目标URL。
  • 获取源码:列出已解析的脚本,用于后续调试器操作。
  • 截图:捕获当前页面的截图。

Example List

示例列表

  • Inspecting the DOM: Find a session, fetch the document tree, and inspect a specific node.
  • Evaluating JavaScript: Run a small JavaScript expression in the current Lynx session.
  • Redirect with Development URL: Reload a page with a local dev-server URL during development.
  • Getting Console Logs: Filter console output to focus on errors and warnings.
  • 检查DOM:查找会话、获取文档树并检查特定节点。
  • 执行JavaScript:在当前Lynx会话中运行小型JavaScript表达式。
  • 使用开发环境URL重定向:开发过程中使用本地开发服务器URL重新加载页面。
  • 获取控制台日志:过滤控制台输出,聚焦错误和警告。

Troubleshooting

问题排查

For connector and transport debug logging, see Troubleshooting Reference.
如需查看连接器和传输层调试日志,请参考问题排查参考

References

参考文档

  • Supported CDP Methods: Detailed documentation of all supported CDP methods, their inputs, and outputs.
  • Supported App Methods: Detailed documentation of all supported App methods, their inputs, and outputs.
  • Get Console Reference: Detailed documentation of the
    get-console
    command.
  • Get Sources Reference: Detailed documentation of the
    get-sources
    command.
  • Take Screenshot Reference: Detailed documentation of the
    take-screenshot
    command.
  • Troubleshooting Reference: Debug namespaces, transport-level logs, and examples of healthy connector output.
  • 支持的CDP方法:所有支持的CDP方法、输入和输出的详细文档。
  • 支持的应用方法:所有支持的应用方法、输入和输出的详细文档。
  • 获取控制台参考
    get-console
    命令的详细文档。
  • 获取源码参考
    get-sources
    命令的详细文档。
  • 截图参考
    take-screenshot
    命令的详细文档。
  • 问题排查参考:调试命名空间、传输层日志,以及正常连接器输出的示例。