From e7d6658c7a1303496d7a3e8f9659e7851410b139 Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:34:00 +0100 Subject: [PATCH 1/6] add generic launch.json for debugging/dap --- .vscode/launch.json | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..2573a8e852 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,38 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch server", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/apps/server/src/main.ts", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/tsx", + "env": { + "NODE_ENV": "development", + "TRILIUM_ENV": "dev", + "TRILIUM_DATA_DIR": "${input:trilium_data_dir}", + "TRILIUM_RESOURCE_DIR": "${workspaceFolder}/apps/server/src" + }, + "cwd": "${workspaceFolder}", + "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"] + }, + { + "name": "Launch vitest", + "type": "node", + "request": "launch", + "program": "${file}", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/vitest", + "runtimeArgs": ["--inspectBrk", "--no-file-parallelism", "run"], + "cwd": "${workspaceFolder}", + "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"] + } + ], + "inputs": [ + { + "id": "trilium_data_dir", + "type": "promptString", + "description": "Select Trilum Notes data directory", + "default": "${workspaceFolder}/apps/server/data" + } + ] +} From ef6c733f93fae2abfbdfed45e15c9c64ca5ddc5b Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Tue, 10 Feb 2026 18:15:51 +0100 Subject: [PATCH 2/6] add options recommended by tsx.is docs --- .vscode/launch.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2573a8e852..953428cdb0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,6 +14,8 @@ "TRILIUM_RESOURCE_DIR": "${workspaceFolder}/apps/server/src" }, "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"] }, { From 5c007cdebc3a1ac0f41605c31a72ec5f84fb658a Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Tue, 10 Feb 2026 18:45:56 +0100 Subject: [PATCH 3/6] adjust vi launch.json to be based on vitest.dev/guide/debugging --- .vscode/launch.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 953428cdb0..a45f8602fc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,14 +19,16 @@ "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"] }, { - "name": "Launch vitest", + "name": "Launch Vitest with current test file", "type": "node", "request": "launch", - "program": "${file}", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/vitest", - "runtimeArgs": ["--inspectBrk", "--no-file-parallelism", "run"], - "cwd": "${workspaceFolder}", - "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"] + "autoAttachChildProcesses": true, + "program": "${workspaceFolder}/node_modules/vitest/vitest.mjs", + "args": ["run", "${relativeFile}"], + "smartStep": true, + "console": "integratedTerminal", + "skipFiles": ["/**", "**/node_modules/**"], + "cwd": "${workspaceFolder}" } ], "inputs": [ From fd8ab990bdaa39d3522d4273899aa81223598de5 Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:25:58 +0100 Subject: [PATCH 4/6] add autoAttachChildProcesses to launch server config --- .vscode/launch.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index a45f8602fc..6aee4ca1af 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,6 +13,7 @@ "TRILIUM_DATA_DIR": "${input:trilium_data_dir}", "TRILIUM_RESOURCE_DIR": "${workspaceFolder}/apps/server/src" }, + "autoAttachChildProcesses": true, "cwd": "${workspaceFolder}", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", From 4c36a9cca93cb7dfb3f51fb090aadcbd6de38cc7 Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:11:21 +0100 Subject: [PATCH 5/6] add client and compound launch entry --- .vscode/launch.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6aee4ca1af..e69744775a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,14 @@ { "version": "0.2.0", "configurations": [ + { + "name": "Launch client (Chrome)", + "request": "launch", + "type": "chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}/apps/client", + "runtimeExecutable": "${input:pick_chrome_browser}" + }, { "name": "Launch server", "type": "node", @@ -32,12 +40,26 @@ "cwd": "${workspaceFolder}" } ], + "compounds": [ + { + "name": "Launch client (Chrome) and server", + "configurations": ["Launch server","Launch client (Chrome)"], + "stopAll": true + } + ], "inputs": [ { "id": "trilium_data_dir", "type": "promptString", "description": "Select Trilum Notes data directory", "default": "${workspaceFolder}/apps/server/data" + }, + { + "id": "pick_chrome_browser", + "type": "pickString", + "description": "Select a Chrome browser", + "options": ["/usr/bin/chromium-browser", "/usr/bin/google-chrome"], + "default": "/usr/bin/chromium-browser" } ] } From b5300e5b868a5abfa5bea60a7a10442112271261 Mon Sep 17 00:00:00 2001 From: misch334 <259832695+misch334@users.noreply.github.com> Date: Mon, 23 Feb 2026 12:29:29 +0100 Subject: [PATCH 6/6] make browser reference platform-agnostic and reliant on defaults --- .vscode/launch.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index e69744775a..c58bd439d9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,8 +6,7 @@ "request": "launch", "type": "chrome", "url": "http://localhost:8080", - "webRoot": "${workspaceFolder}/apps/client", - "runtimeExecutable": "${input:pick_chrome_browser}" + "webRoot": "${workspaceFolder}/apps/client" }, { "name": "Launch server", @@ -53,13 +52,6 @@ "type": "promptString", "description": "Select Trilum Notes data directory", "default": "${workspaceFolder}/apps/server/data" - }, - { - "id": "pick_chrome_browser", - "type": "pickString", - "description": "Select a Chrome browser", - "options": ["/usr/bin/chromium-browser", "/usr/bin/google-chrome"], - "default": "/usr/bin/chromium-browser" } ] }