diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..3b407dc7 --- /dev/null +++ b/.vscode/launch.json @@ -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"] + } + ] +} diff --git a/README.md b/README.md index 36bc7b6f..3aca9c45 100644 --- a/README.md +++ b/README.md @@ -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 ./...