Debugger API 列表
本模块包含 6 个 API。
Events(事件)
| API | 说明 | 鸿蒙支持 |
|---|---|---|
| detach | 在调试会话终止时触发,可能原因为对应的 webContents 已关闭或对其调用了 devtools | 支持 |
| message | 在远程调试协议中收到调试消息时触发,消息 ID 与 debugger.sendCommand 发送的 | 支持 |
Methods(方法)
| API | 说明 | 鸿蒙支持 |
|---|---|---|
| debugger.attach([protocolVersion]) | 将调试器附加到 webContents。 | 支持 |
| debugger.isAttached() | 返回 boolean,表示调试器是否已附加到 webContents。 | 支持 |
| debugger.detach() | 将调试器从 webContents 上分离。 | 支持 |
| debugger.sendCommand(method[, commandParams, sessionId]) | 返回 Promise,以远程调试协议定义的响应 resolve。 | 支持 |