feat(vs-code): Debugging (#924)
All checks were successful
Build Docker image / docker (push) Successful in 31s
Build / build (18) (push) Successful in 36s
Build / build (22) (push) Successful in 55s
Build / build (20) (push) Successful in 1m17s

Reviewed-on: #924
Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
Co-committed-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
This commit is contained in:
Ordis 2025-02-07 09:49:13 -08:00 committed by OrdisPrime
parent 079f9ebbdf
commit eb3acad598
4 changed files with 22 additions and 0 deletions

19
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,19 @@
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug and Watch",
"runtimeArgs": ["-r", "tsconfig-paths/register", "-r", "ts-node/register", "--watch-path", "src"],
"args": ["${workspaceFolder}/src/index.ts"],
"console": "integratedTerminal"
}
]
}
//can use "console": "internalConsole" for VS Code's Debug Console. For that, forceConsole in logger.ts is needed to be true
//"internalConsoleOptions": "openOnSessionStart" can be useful then

1
package-lock.json generated
View File

@ -26,6 +26,7 @@
"eslint-plugin-prettier": "^5.2.3",
"morgan": "^1.10.0",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": ">=4.7.4 <5.6.0"

View File

@ -31,6 +31,7 @@
"eslint-plugin-prettier": "^5.2.3",
"morgan": "^1.10.0",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.2.0",
"typescript": ">=4.7.4 <5.6.0"

View File

@ -58,6 +58,7 @@ const combinedLog = new transports.DailyRotateFile({
});
const consoleLog = new transports.Console({
forceConsole: false,
format: format.combine(
format.colorize(),
format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss:SSS" }), // uses local timezone