增加vscode本地启动debug的脚本

This commit is contained in:
zhl 2020-12-04 10:18:36 +08:00
parent 1f1a942eba
commit 570eb8a214
2 changed files with 27 additions and 12 deletions

38
.vscode/launch.json vendored
View File

@ -4,17 +4,31 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"address": "192.168.100.24", "name": "Local Svr",
"localRoot": "${workspaceFolder}", "request": "launch",
"name": "192.168.100.24", "runtimeArgs": [
"port": 9229, "run-script",
"remoteRoot": "Absolute path to the remote directory containing the program", "debug"
"request": "attach", ],
"skipFiles": [ "runtimeExecutable": "npm",
"<node_internals>/**" "skipFiles": [
], "<node_internals>/**"
"type": "pwa-node" ],
} "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": [
"<node_internals>/**"
],
"type": "pwa-node"
}
] ]
} }

View File

@ -6,6 +6,7 @@
"typings": "src/global.d.ts", "typings": "src/global.d.ts",
"scripts": { "scripts": {
"start": "ts-node-dev --inspect --files src/index.ts", "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", "loadtest": "colyseus-loadtest loadtest/example.ts --room my_room --numClients 3",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },