build: debug the Windows programs from VS Code

F5 in VS Code now starts Titano, the Uploader and the server under the C#
extension's debugger, as well as the --capture runs, Titano.Tools and the test
programs. Each configuration builds in Debug first and starts the program's
.exe rather than its .dll, because the programs read Environment.ProcessPath
(Setup's payload, the Run keys and tray icons). The server's session keeps its
data and archive in out/debug/server instead of %ProgramData% and
C:\TitanoArchive.

The build tasks use no reused MSBuild nodes, whose cached drive-letter case
made every F5 build restore and C# Dev Kit reload, and keep MSB3026 (a copy
that succeeds on a retry) a warning so a file held for a moment no longer
stops F5.

Design-time builds skip the icon generation, which on a fresh clone ran a
Titano.Tools.dll that did not exist yet (MSB3073 in VS Code), and log WPF's
MC1000 about projects not built yet as a message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-15 14:53:12 +02:00
1 parent 48923d0776
commit 19265b36c2
8 files changed
+365 -1

No files matched your search

+28
View File
@@ -57,6 +57,34 @@ docker compose -f deploy/docker/docker-compose.yml up -d
The server reads `/data/server.json` (`TITANO_DATA_PATH`) and `TITANO_*` environment variables;
`Titano.Server --help` lists them. On Linux it needs PostgreSQL; on Windows it defaults to SQLite.
### Debug in VS Code (Windows)
Open the repository folder with the C# extension (`.vscode/extensions.json` recommends it), pick a configuration in
*Run and Debug* and press F5. Each launch configuration builds in Debug first (`.vscode/tasks.json`).
| Configuration | Starts |
|---|---|
| Titano, Titano Uploader | The desktop programs, with their usual data folder (`%LOCALAPPDATA%\Titano`) |
| Titano Server | The server on SQLite, ports 8080 and 8443, data and archive in `out/debug/server`; then opens the admin panel |
| … (screenshots) | `--capture out/screenshots` of Titano, the Uploader or Setup |
| Titano.Tools | The command line it asks for (`i18n check` by default) |
| Tests | The test program and runner options it asks for (`--filter`, `--parallel 1`, …), after building the solution |
| Attach to process | Nothing: attaches to a running process picked from a list |
- Sessions run side by side: start the next one with the green *Start* button in *Run and Debug* once the previous
build has finished (F5 starts a session only when none runs). *Tests* rebuilds the programs too, so stop their
sessions first when the code has changed.
- Quit an installed Titano or Uploader first: a second copy hands over to it and ends. Debugging the Uploader points
an existing *Start with Windows* entry at the Debug build. Closing the Uploader's window keeps it in the tray (the
default): end its session with *Stop*.
- Stop the Docker stack or an installed Titano Server before *Titano Server*, which needs the same ports. The browser
warns about the server's self-signed certificate; sign in as `admin` with the temporary password in
`out/debug/server/data/initial-admin-password.txt`.
- Titano, the Uploader and Setup log to files (`%LOCALAPPDATA%\Titano\logs`, `%TEMP%\Titano Setup`); the server logs
to the Debug Console. Windows Firewall asks about Titano, the Uploader and the server at their first start.
- VS Code passes the drive letter in lower case: the first build after one made with an upper-case drive letter
(another terminal, Visual Studio) restores and recompiles everything.
## CI
| Workflow | When | What |