【发布时间】:2014-10-07 13:53:21
【问题描述】:
我正在 IDEA 上设置 node-webkit 并发现调试问题 - 断点不起作用。
这是我的代码:
index.html
<!DOCTYPE html>
<html>
<body onload="process.mainModule.exports.callback0()">
<script>
var sup = require('./sup.js')
document.write(sup.hi())
</script>
</body>
</html>
package.json
{
"main": "index.html",
"name": "Test",
"version": "0.0.0",
"node-main": "node-main.js"
}
sup.js
module.exports = {
hi: function() {
return 'hi'; //breakpoint here don't work
}
}
node-main.js
var i = 0;
exports.callback0 = function () {
console.log(i + ": " + window.location); //breakpoint here don't work
}
控制台输出
0: file:///C:/%5CWork%5Cwebkit%5Cwebkitbase/index.html
HTML 输出
嗨
这意味着所有执行的脚本和问题都在 IDEA 调试中。可能是什么原因?
【问题讨论】:
标签: javascript node.js intellij-idea node-webkit