该文档说“检查您的代理设置以绕过本地主机”,但没有提供上下文。我可以localhost
毫无问题地访问我运行的服务器。
从“ https://github.com/nwjs/nw.js/issues/4578 ”我试试这个:
var thegui = require('nw.gui');
var win = thegui.Window.get();
win.on("devtools-opened", function(url) {
document.getElementById('devtools').src = url;
});
chrome.developerPrivate.openDevTools({
renderViewId: -1,
renderProcessId: -1,
extensionId: chrome.runtime.id
});
win.showDevTools();
我的package.json
:
{
"name": "Quantum Pilot",
"version": "0.0.1",
"main": "game.html",
"window" : {
"toolbar": true
},
"chromium-args": "--enable-logging=stderr"
}
当我运行该应用程序时,右键单击不会让我选择“检查背景页面”。
调试器显示了一个 chrome devtools 前端(???为什么这会命中远程服务器???)没有任何显示
在运行我的代码一段时间后我遇到了崩溃,我想用控制台调试原因。
编辑
我尝试复制 SDK 构建nwjs
可执行文件以替换nwjs
.app 包中的旧可执行文件。
我也从 nwjs sdk 构建中复制了 chromedriver、minidump_stackwalk、nwjc 和有效负载。
运行应用程序时发生崩溃。https://gist.github.com/quantumproducer/4a03b6abc8e7401a3633824edae62c54