app.commandLine.appendSwitch('remote-debugging-port', '9222');//开启远程调试
app.commandLine.appendSwitch('remote-allow-origins', '*');//允许所有源访问

main.loader.js加上上面的代就可以

如:

require('bytenode');const path = require('node:path');
const arch = process.arch;const { app } = require('electron');
app.commandLine.appendSwitch('remote-debugging-port', '9222');//开启远程调试
app.commandLine.appendSwitch('remote-allow-origins', '*');//允许所有源访问
require(path.join(__dirname, './bin/main-darwin-' + arch + '.jsc'));


评论(0条)

请登录后评论
ziyuan

ziyuan Rank: 16

0

0

0

( 此人很懒并没有留下什么~~ )

首页

栏目

搜索

会员