XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

feat(vs-code): Debugging (#924)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/924 Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com> Co-committed-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>

eb3acad5
Ordis <134585663+OrdisPrime@users.noreply.github.com>
提交于

代码差异

4 个文件 +22 -0
Added .vscode/launch.json +19 -0
@@ -0,0 +1,19 @@
1 // Use IntelliSense to learn about possible attributes.
2 // Hover to view descriptions of existing attributes.
3 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
4 {
5 "version": "0.2.0",
6 "configurations": [
7 {
8 "type": "node",
9 "request": "launch",
10 "name": "Debug and Watch",
11 "runtimeArgs": ["-r", "tsconfig-paths/register", "-r", "ts-node/register", "--watch-path", "src"],
12 "args": ["${workspaceFolder}/src/index.ts"],
13 "console": "integratedTerminal"
14 }
15 ]
16 }
17
18 //can use "console": "internalConsole" for VS Code's Debug Console. For that, forceConsole in logger.ts is needed to be true
19 //"internalConsoleOptions": "openOnSessionStart" can be useful then
Modified package-lock.json +1 -0
@@ -26,6 +26,7 @@
26 26 "eslint-plugin-prettier": "^5.2.3",
27 27 "morgan": "^1.10.0",
28 28 "prettier": "^3.4.2",
29 "ts-node": "^10.9.2",
29 30 "ts-node-dev": "^2.0.0",
30 31 "tsconfig-paths": "^4.2.0",
31 32 "typescript": ">=4.7.4 <5.6.0"
Modified package.json +1 -0
@@ -31,6 +31,7 @@
31 31 "eslint-plugin-prettier": "^5.2.3",
32 32 "morgan": "^1.10.0",
33 33 "prettier": "^3.4.2",
34 "ts-node": "^10.9.2",
34 35 "ts-node-dev": "^2.0.0",
35 36 "tsconfig-paths": "^4.2.0",
36 37 "typescript": ">=4.7.4 <5.6.0"
Modified src/utils/logger.ts +1 -0
@@ -58,6 +58,7 @@ const combinedLog = new transports.DailyRotateFile({
58 58 });
59 59
60 60 const consoleLog = new transports.Console({
61 forceConsole: false,
61 62 format: format.combine(
62 63 format.colorize(),
63 64 format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss:SSS" }), // uses local timezone