Add the VS Code debug configuration
ci / test (postgres) (push) Successful in 3m18s
ci / test (sqlite) (push) Successful in 2m1s
ci / test (postgres) (pull_request) Successful in 3m50s
ci / test (sqlite) (pull_request) Successful in 2m26s
ci / image (push) Successful in 8s
ci / image (pull_request) Successful in 6s

Four launch entries for the server: a data folder of its own under
artifacts/ (ignored by git), the demo mode, the user's real data folder,
and attach to a running process. Each builds in Debug first and opens the
browser once the server listens. tasks.json also exposes check, test and
dev. SVILUPPO.md explains which entry to pick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-11 11:53:49 +01:00
1 parent f278ff4f67
commit 9db95ea79a
4 files changed
+130

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
{
// The C# extension provides the "coreclr" debugger used by launch.json.
"recommendations": ["ms-dotnettools.csharp"]
}
+70
View File
@@ -0,0 +1,70 @@
{
// Debugging Anubis from VS Code (needs the C# extension, ms-dotnettools.csharp).
// Each configuration builds the server in Debug first and opens the browser once it listens.
"version": "0.2.0",
"configurations": [
{
"name": "Anubis: server, dati di prova",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-server",
"program": "${workspaceFolder}/src/Anubis.Server/bin/Debug/net10.0/Anubis.Server.dll",
// A data folder of its own, ignored by git: the real one in %APPDATA%\Anubis stays untouched.
"args": ["--data-dir", "${workspaceFolder}/artifacts/debug-data"],
"cwd": "${workspaceFolder}/src/Anubis.Server",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "internalConsole",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "Now listening on: (https?://[^\\s\"]+)"
}
},
{
"name": "Anubis: modalità dimostrativa",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-server",
"program": "${workspaceFolder}/src/Anubis.Server/bin/Debug/net10.0/Anubis.Server.dll",
// The data of SPEC appendix F, in a folder and a database apart (the same as "tasks seed-demo").
"args": ["--demo"],
"cwd": "${workspaceFolder}/src/Anubis.Server",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "internalConsole",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "Now listening on: (https?://[^\\s\"]+)"
}
},
{
"name": "Anubis: server, dati dell'utente",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-server",
"program": "${workspaceFolder}/src/Anubis.Server/bin/Debug/net10.0/Anubis.Server.dll",
// The desktop data folder (%APPDATA%\Anubis), the same one "tasks dev" uses.
"args": [],
"cwd": "${workspaceFolder}/src/Anubis.Server",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "internalConsole",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "Now listening on: (https?://[^\\s\"]+)"
}
},
{
"name": "Anubis: aggancia a un processo",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
+45
View File
@@ -0,0 +1,45 @@
{
// The build the debugger needs, plus the commands of tasks.ps1 (Terminal > Run Task).
"version": "2.0.0",
"tasks": [
{
"label": "build-server",
"type": "process",
"command": "dotnet",
"args": ["build", "${workspaceFolder}/src/Anubis.Server", "-c", "Debug", "-nologo", "-consoleLoggerParameters:NoSummary"],
"group": { "kind": "build", "isDefault": true },
"presentation": { "reveal": "silent", "clear": true },
"problemMatcher": "$msCompile"
},
{
"label": "check",
"type": "shell",
"command": "./tasks.ps1 check",
"windows": { "command": "./tasks.ps1 check" },
"linux": { "command": "sh ./tasks.sh check" },
"osx": { "command": "sh ./tasks.sh check" },
"group": "test",
"problemMatcher": "$msCompile"
},
{
"label": "test",
"type": "shell",
"command": "./tasks.ps1 test",
"windows": { "command": "./tasks.ps1 test" },
"linux": { "command": "sh ./tasks.sh test" },
"osx": { "command": "sh ./tasks.sh test" },
"group": { "kind": "test", "isDefault": true },
"problemMatcher": "$msCompile"
},
{
"label": "dev",
"type": "shell",
"command": "./tasks.ps1 dev",
"windows": { "command": "./tasks.ps1 dev" },
"linux": { "command": "sh ./tasks.sh dev" },
"osx": { "command": "sh ./tasks.sh dev" },
"isBackground": true,
"problemMatcher": []
}
]
}
+11
View File
@@ -79,6 +79,17 @@ Un criterio che dipende solo da qualcosa che deve dare l'utente (chiavi dei cont
Per ogni schermata: implementa, apri sui dati dimostrativi (`tasks seed-demo`), fotografa con Edge senza finestra (`msedge --headless --screenshot`) a 1440 e 390 pixel, confronta zona per zona con lo screen di `docs/design/`, correggi, ripeti finché restano differenze trascurabili. I testi fissi si leggono dalle immagini, i dati dall'appendice F, colori e misure dall'appendice C. Guarda uno screen per volta e ritaglia la zona che ti serve: le immagini sono a doppia densità.
## Debug con Visual Studio Code
Apri la radice del repository in VS Code con l'estensione C# (`ms-dotnettools.csharp`, suggerita da `.vscode/extensions.json`), poi Esegui e debug (F5). Ogni voce compila il server in Debug (attività `build-server` di `.vscode/tasks.json`) e apre il browser quando il server ascolta:
- **Anubis: server, dati di prova**: una cartella dati a parte, `artifacts/debug-data`, ignorata da git. Al primo avvio chiede la configurazione iniziale; per ripartire da zero basta cancellare la cartella.
- **Anubis: modalità dimostrativa**: i dati dell'appendice F, come `tasks seed-demo`.
- **Anubis: server, dati dell'utente**: la cartella vera, `%APPDATA%\Anubis`, come `tasks dev`.
- **Anubis: aggancia a un processo**: per un server già avviato, per esempio con `tasks dev`.
Le attività `check`, `test` e `dev` sono anche in Terminale → Esegui attività. L'estensione è dell'editor, non del progetto: non entra nell'elenco dell'ADR 0004.
## Pacchetti e consegne
- **Docker**: immagine `gitea.encke-hake.ts.net/balbosoft/anubis`, pubblicata dalla CI sui tag `v*` nella sezione Packages del repository (ADR 0002). I tag `fase-N` non pubblicano nulla.