From c542929835d2ad8df9c1a75123f901333ed58160 Mon Sep 17 00:00:00 2001 From: Satinder Singh Date: Sat, 6 Jan 2024 17:26:33 -0800 Subject: [PATCH] fix: add vscode local debugging support (#2585) --- .gitignore | 2 +- .vscode/launch.json | 15 +++++++++++++++ Makefile | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 92cd9f87..e79d4d11 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ bin/ .idea/ *.iml -.vscode/ +.vscode/settings.json tmp/ tmpFiles/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..9e9453a0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}", + "cwd": "${workspaceFolder}", + "debugAdapter": "dlv-dap", + "args": ["--createDatabase=true"] + } + ] +} \ No newline at end of file diff --git a/Makefile b/Makefile index c652e514..b05ba177 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,9 @@ docker-build: ## Build docker image with the manager. docker-push: ## Push docker image with the manager. docker push ${REGISTRY}/${IMG}:${IMG_TAG} +deps: ## Run dependencies for local development + docker compose up -d db + lint-install: ## Install golangci-lint @# The following installs a specific version of golangci-lint, which is appropriate for a CI server to avoid different results from build to build go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1