进程:
Chrome Developer Tools 在 JavaScript 运行时提供了一个 special binding , 允许与页面进行交互和检测。
Event: ‘detach’
返回:
event
Event
Event: ‘message’
返回:
event
Eventmethod
String - 方法名.params
any - Event parameters defined by the ‘parameters’ attribute in the remote debugging protocol.
Emitted whenever the debugging target issues an instrumentation event.
实例方法
debugger.attach([protocolVersion])
protocolVersion
String (optional) - 需要调试的协议的版本
添加调试器到 webContents
。
debugger.detach()
从 webContents
里分离调试器.
debugger.sendCommand(method[, commandParams])
- any (optional) - JSON object with request parameters.
返回 Promise<any>
- 一个 promise,远程调试协议中的命令描述的“returns”属性定义的响应,或者显示命令失败的错误消息。
向调试目标发送给定的命令。