From b4ebf1214ff1fbb56eca9cd686e4a7dda2045cc3 Mon Sep 17 00:00:00 2001 From: William Phetsinorath Date: Thu, 29 Jan 2026 15:23:34 +0100 Subject: [PATCH] chore: add VSCode debugging configurations Signed-off-by: William Phetsinorath --- .vscode/extensions.json | 2 + .vscode/launch.json | 94 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 92 insertions(+), 4 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4775b82f4..3795e131e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -15,6 +15,8 @@ // Vitejs "antfu.vite", "antfu.browse-lite", + // Firefox Debugger + "firefox-devtools.vscode-firefox-debug", // CSS "csstools.postcss", "stylelint.vscode-stylelint", diff --git a/.vscode/launch.json b/.vscode/launch.json index 55297a817..b8fdc4ecb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,11 +1,25 @@ { - // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. - // Pointez pour afficher la description des attributs existants. - // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { - "name": "Attach to Remote", + "name": "Launch Server", + "type": "node", + "request": "launch", + "runtimeExecutable": "pnpm", + "runtimeArgs": [ + "run", + "dev" + ], + "cwd": "${workspaceFolder}/apps/server", + "console": "integratedTerminal", + "restart": true, + "skipFiles": [ + "/**", + "${workspaceFolder}/node_modules/**/*.js" + ] + }, + { + "name": "Attach Server", "type": "node", "request": "attach", "port": 9229, @@ -17,6 +31,78 @@ "/**", "${workspaceFolder}/node_modules/**/*.js" ] + }, + { + "name": "Serve Client (Chrome)", + "type": "node", + "request": "launch", + "runtimeExecutable": "pnpm", + "runtimeArgs": [ + "run", + "dev", + "--", + "--port", + "8080", + "--strictPort" + ], + "cwd": "${workspaceFolder}/apps/client", + "console": "integratedTerminal", + "serverReadyAction": { + "pattern": "Local:.*(http://localhost:[0-9]+)", + "action": "startDebugging", + "name": "Launch Client (Chrome)" + } + }, + { + "name": "Serve Client (Firefox)", + "type": "node", + "request": "launch", + "runtimeExecutable": "pnpm", + "runtimeArgs": [ + "run", + "dev", + "--", + "--port", + "8080", + "--strictPort" + ], + "cwd": "${workspaceFolder}/apps/client", + "console": "integratedTerminal", + "serverReadyAction": { + "pattern": "Local:.*(http://localhost:[0-9]+)", + "action": "startDebugging", + "name": "Launch Client (Firefox)" + } + }, + { + "name": "Launch Client (Chrome)", + "type": "chrome", + "request": "launch", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}/apps/client" + }, + { + "name": "Launch Client (Firefox)", + "type": "firefox", + "request": "launch", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}/apps/client" + } + ], + "compounds": [ + { + "name": "Launch (Chrome)", + "configurations": [ + "Launch Server", + "Serve Client (Chrome)" + ] + }, + { + "name": "Launch (Firefox)", + "configurations": [ + "Launch Server", + "Serve Client (Firefox)" + ] } ] }