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)" + ] } ] }