From b9537628ec186627ce39ab2a0408a81e38d43561 Mon Sep 17 00:00:00 2001 From: pacinor <2177271479@qq.com> Date: Wed, 10 Apr 2024 13:23:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=9C=E7=A8=8B=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E5=87=BA=E7=8E=B0=E2=80=9CDebugging=20connection=20wa?= =?UTF-8?q?s=20closed.Reason:WebSocket=20disconnectedReconnectwhen=20ready?= =?UTF-8?q?byreopeningDevTools.=E2=80=9D=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=AF=B9Renderer=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=9A=84=E6=96=B9=E5=BC=8FRenderer(DEBUG)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6e5c6003..686def73 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,8 @@ "skipFiles": [ "/**" ], - "type": "node" + "type": "node", + "sourceMaps": true }, { @@ -21,6 +22,7 @@ "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "runtimeArgs": [ "--remote-debugging-port=9222", + "--remote-allow-origins=*", "${workspaceFolder}/dist/main/index.cjs", ], "env": { @@ -35,8 +37,21 @@ "type": "chrome", "request": "launch", "name": "Renderer(inspector)", - "url": "http://localhost:9222", - "webRoot": "${workspaceFolder}/dist/packages/renderer", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", + "runtimeArgs": [ + "--remote-debugging-port=9222", + "--remote-allow-origins=*", + "${workspaceFolder}/dist/main/index.cjs", + ], + "env": { + "DEBUG": "true", + }, + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" + }, + "sourceMaps": true, + "url": "http://localhost:3344", + "webRoot": "${workspaceFolder}/packages/renderer", }, { "type": "node", @@ -45,6 +60,8 @@ "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "runtimeArgs": [ "${workspaceFolder}/dist/main/index.cjs", + "--remote-debugging-port=9222", + "--remote-allow-origins=*", ], "env": { "VITE_DEV_SERVER_HOST": "127.0.0.1", @@ -65,7 +82,15 @@ ], "compounds": [ { - "name": "DEBUG", + "name": "main(DEBUG)", + "configurations": [ + "Serve(inspector)", + "Main(inspector)", + ], + "preLaunchTask": "" + }, + { + "name": "Renderer(DEBUG)", "configurations": [ "Serve(inspector)", "Main(inspector)",