Add VS Code F5 launch profiles for Edge and Firefox

This commit is contained in:
2026-02-26 08:33:09 +01:00
parent 11ab7c959b
commit 0ec19bf682
4 changed files with 95 additions and 1 deletions

4
.gitignore vendored
View File

@@ -6,7 +6,9 @@ artifacts/
# IDE # IDE
.vs/ .vs/
.vscode/ .vscode/*
!.vscode/launch.json
!.vscode/tasks.json
node_modules/ node_modules/
# User secrets / configs # User secrets / configs

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

@@ -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'"
}
]
}

21
.vscode/tasks.json vendored Normal file
View File

@@ -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
}
}
]
}

View File

@@ -55,6 +55,12 @@ Backend state persistence:
``` ```
3. Open `http://localhost:5000` (or the port shown in the console). 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`. To use a custom SQLite database path, set `ConnectionStrings__RpgRoller`.
## Frontend Runtime ## Frontend Runtime