chore: add debugging instructions and vscode launch config (#1953)

This commit is contained in:
Roland 2025-12-15 22:49:48 +07:00 committed by GitHub
parent 32f09d3a9f
commit 8c9aeff5b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

18
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}",
"cwd": "${workspaceFolder}",
"env": {},
"buildFlags": ["-gcflags=all=-N -l"]
}
]
}

View file

@ -95,6 +95,10 @@ _If you get a blank screen, try running in your normal terminal (outside of vsco
$ docker build . -t nwc-local --progress=plain
$ docker run -v $(pwd)/.data/docker:/data -e WORK_DIR='/data' -p 8080:8080 nwc-local
### Debugging
In vscode open [cmd/http/main.go](cmd/http/main.go) and then press F5. You can set breakpoints in the Alby Hub code and third party modules
### Testing
$ go test ./...