增加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

14
.vscode/launch.json vendored
View File

@ -4,6 +4,20 @@
// 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": [
{
"name": "Local Svr",
"request": "launch",
"runtimeArgs": [
"run-script",
"debug"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
},
{ {
"address": "192.168.100.24", "address": "192.168.100.24",
"localRoot": "${workspaceFolder}", "localRoot": "${workspaceFolder}",

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"
}, },