浏览代码

添加electron调试信息

dengdx 1 周之前
父节点
当前提交
0ea3fdbd0f
共有 3 个文件被更改,包括 384 次插入72 次删除
  1. 64 0
      .vscode/launch.json
  2. 319 72
      package-lock.json
  3. 1 0
      package.json

+ 64 - 0
.vscode/launch.json

@@ -0,0 +1,64 @@
+{
+  "version": "0.2.1",
+  "configurations": [
+    {
+      "name": "Debug Electron Main Process",
+      "type": "node",
+      "request": "launch",
+      "cwd": "${workspaceFolder}",
+      "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
+      "args": [
+        ".",
+        "--enable-dev-menu",
+        "--enable-dev-tools"
+      ],
+      "outputCapture": "std",
+      "console": "integratedTerminal",
+      "skipFiles": [
+        "<node_internals>/**"
+      ],
+      "env": {
+        "NODE_ENV": "development"
+      }
+    },
+    {
+      "name": "Debug Electron Renderer Process",
+      "type": "chrome",
+      "request": "attach",
+      "port": 9222,
+      "webRoot": "${workspaceFolder}/src",
+      "timeout": 30000,
+      "skipFiles": [
+        "**/node_modules/**"
+      ]
+    },
+    {
+      "name": "Debug Electron (Both Processes)",
+      "type": "node",
+      "request": "launch",
+      "cwd": "${workspaceFolder}",
+      "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
+      "args": [
+        ".",
+        "--enable-dev-menu",
+        "--enable-dev-tools",
+        "--remote-debugging-port=9222"
+      ],
+      "outputCapture": "std",
+      "console": "integratedTerminal",
+      "skipFiles": [
+        "<node_internals>/**"
+      ],
+      "env": {
+        "NODE_ENV": "development"
+      }
+    }
+  ],
+  "compounds": [
+    {
+      "name": "Debug Electron (Main + Renderer)",
+      "configurations": ["Debug Electron (Both Processes)", "Debug Electron Renderer Process"],
+      "stopAll": true
+    }
+  ]
+}

文件差异内容过多而无法显示
+ 319 - 72
package-lock.json


+ 1 - 0
package.json

@@ -120,6 +120,7 @@
     "cordova": "^12.0.0",
     "cross-env": "^10.1.0",
     "cypress": "^14.5.4",
+    "electron": "^39.2.7",
     "electron-builder": "^26.0.12",
     "eslint": "^9.28.0",
     "eslint-config-prettier": "^10.1.5",

部分文件因为文件数量过多而无法显示