Commit c7c1f32b authored by Akari Labs's avatar Akari Labs

chrome debug stuff

parent 43a14f9f
......@@ -16,8 +16,28 @@
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args" : ["dist"],
"args": [
"dist"
],
"outputCapture": "std"
},
{
"type": "chrome",
"request": "launch",
"name": "Debug chrome",
"urlFilter": "internal://chrome/*",
"webRoot": "${workspaceFolder}/dist/internal/chrome",
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceFolder}/*"
},
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"runtimeArgs": [
"dist"
]
}
]
}
\ No newline at end of file
......@@ -11,6 +11,8 @@ import { getKey } from '../offlineBlobStore';
import { destroyWindow, createBrowserWindow } from './index';
var nextPort = 9222;
export class NaviWindow {
readonly window: BrowserWindow;
......@@ -19,6 +21,8 @@ export class NaviWindow {
constructor(args?: Partial<TabCreationArgs>) {
if (constants.build === 'dev') console.log(`new window on port ${nextPort}`);
const win = this.window = new BrowserWindow({
title: constants.appName,
icon: path.join(__dirname, 'icon.png'),
......@@ -31,7 +35,8 @@ export class NaviWindow {
transparent: false,
frame: false,
webPreferences: {
nodeIntegration: true
nodeIntegration: true,
additionalArguments: constants.build === 'dev' ? [`--remote-debugging-port=${nextPort++}`] : []
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment