1,找到上次的提示null脚本错误原因,是protocol json参数没没对上。主要是
InspectorBackend.registerCommand("CSS.getMatchedStylesForNode", [{"name": "nodeId", "type": "number", "optional": false},
{"name": "excludePseudo", "type": "boolean", "optional": false},{"name": "excludeInherited", "type": "boolean", "optional": false}],
["matchedCSSRules", "pseudoElements", "inherited"], false);
这后面几个参数,需要和cpp的InspectorBackendDispatcherImpl对应上
2,修复js调试问题,js下断点的时候找不到源码路径。原因是:
需要到这里设置ContextDebugData到v8::content,这样js的Debug.scripts()[xxxx].context_data才可以取出来
> node.dll!blink::V8Debugger::setContextDebugData
node.dll!blink::MainThreadDebugger::initializeContext
node.dll!blink::WindowProxy::initialize(
node.dll!blink::WindowProxy::initializeIfNeeded