From 570eb8a2142f156a4b9c2b92e2ce3e91d10b0f50 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 4 Dec 2020 10:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0vscode=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=90=AF=E5=8A=A8debug=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 38 ++++++++++++++++++++++++++------------ package.json | 1 + 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f19fcc0..96a262c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,17 +4,31 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { - "address": "192.168.100.24", - "localRoot": "${workspaceFolder}", - "name": "192.168.100.24", - "port": 9229, - "remoteRoot": "Absolute path to the remote directory containing the program", - "request": "attach", - "skipFiles": [ - "/**" - ], - "type": "pwa-node" - } + { + "name": "Local Svr", + "request": "launch", + "runtimeArgs": [ + "run-script", + "debug" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "pwa-node" + }, + + { + "address": "192.168.100.24", + "localRoot": "${workspaceFolder}", + "name": "192.168.100.24", + "port": 9229, + "remoteRoot": "Absolute path to the remote directory containing the program", + "request": "attach", + "skipFiles": [ + "/**" + ], + "type": "pwa-node" + } ] } \ No newline at end of file diff --git a/package.json b/package.json index e0014d8..ca20a43 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "typings": "src/global.d.ts", "scripts": { "start": "ts-node-dev --inspect --files src/index.ts", + "debug": "node --require ts-node/register --inspect src/index.ts", "loadtest": "colyseus-loadtest loadtest/example.ts --room my_room --numClients 3", "test": "echo \"Error: no test specified\" && exit 1" },