From 0ec19bf682afa9f6628c9aa7fc5f0ff213b02322 Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Thu, 26 Feb 2026 08:33:09 +0100 Subject: [PATCH] Add VS Code F5 launch profiles for Edge and Firefox --- .gitignore | 4 ++- .vscode/launch.json | 65 +++++++++++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 21 +++++++++++++++ README.md | 6 +++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 646165f..f638e00 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,9 @@ artifacts/ # IDE .vs/ -.vscode/ +.vscode/* +!.vscode/launch.json +!.vscode/tasks.json node_modules/ # User secrets / configs diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..531b9f4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,65 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "RpgRoller: Server", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/RpgRoller/bin/Debug/net10.0/RpgRoller.dll", + "args": [], + "cwd": "${workspaceFolder}/RpgRoller", + "stopAtEntry": false, + "console": "internalConsole", + "env": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:7271;http://localhost:5175" + } + }, + { + "name": "RpgRoller: Server + Edge (F5)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/RpgRoller/bin/Debug/net10.0/RpgRoller.dll", + "args": [], + "cwd": "${workspaceFolder}/RpgRoller", + "stopAtEntry": false, + "console": "internalConsole", + "env": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:7271;http://localhost:5175" + }, + "serverReadyAction": { + "action": "debugWithEdge", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + } + }, + { + "name": "RpgRoller: Server + Firefox (F5)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/RpgRoller/bin/Debug/net10.0/RpgRoller.dll", + "args": [], + "cwd": "${workspaceFolder}/RpgRoller", + "stopAtEntry": false, + "console": "internalConsole", + "env": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:7271;http://localhost:5175" + }, + "serverReadyAction": { + "action": "startDebugging", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)", + "name": "RpgRoller: Open Firefox" + } + }, + { + "name": "RpgRoller: Open Firefox", + "type": "node-terminal", + "request": "launch", + "command": "$firefox = Join-Path $env:ProgramFiles 'Mozilla Firefox\\firefox.exe'; if (-not (Test-Path $firefox)) { $firefox = Join-Path ${env:ProgramFiles(x86)} 'Mozilla Firefox\\firefox.exe' }; Start-Process -FilePath $firefox -ArgumentList 'https://localhost:7271'" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..3decdb8 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,21 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/RpgRoller.sln", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/README.md b/README.md index 384ecf5..327129c 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,12 @@ Backend state persistence: ``` 3. Open `http://localhost:5000` (or the port shown in the console). +VS Code F5 debug profiles are available in `.vscode/launch.json`: + +- `RpgRoller: Server` +- `RpgRoller: Server + Edge (F5)` +- `RpgRoller: Server + Firefox (F5)` + To use a custom SQLite database path, set `ConnectionStrings__RpgRoller`. ## Frontend Runtime