chore: add debug mode for main process

This commit is contained in:
CallanBi committed 2022-02-24 18:38:43 +08:00
1 parent 2deb101c42
commit 3dc1bce537
9 files changed
+103 -12

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Main(inspector)",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"runtimeArgs": [
"--remote-debugging-port=9222",
"${workspaceFolder}/dist/main/index.cjs",
],
"env": {
"DEBUG": "true",
},
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"sourceMaps": true
},
{
"type": "node",
"request": "launch",
"name": "Main(vite)",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"runtimeArgs": [
"${workspaceFolder}/dist/main/index.cjs",
],
"env": {
"VITE_DEV_SERVER_HOST": "127.0.0.1",
"VITE_DEV_SERVER_PORT": "3344",
},
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"sourceMaps": true
},
]
}
+13
View File
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "debug",
"problemMatcher": [],
"label": "npm: debug",
"detail": "cross-env-shell NODE_ENV=debug \"npm run typecheck && node scripts/build.mjs && vite ./packages/renderer\"",
"group": "build"
}
]
}