Skip to content

Commit c542929

Browse files
authored
fix: add vscode local debugging support (casdoor#2585)
1 parent 86dea71 commit c542929

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bin/
1818

1919
.idea/
2020
*.iml
21-
.vscode/
21+
.vscode/settings.json
2222

2323
tmp/
2424
tmpFiles/

.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug",
6+
"type": "go",
7+
"request": "launch",
8+
"mode": "auto",
9+
"program": "${workspaceFolder}",
10+
"cwd": "${workspaceFolder}",
11+
"debugAdapter": "dlv-dap",
12+
"args": ["--createDatabase=true"]
13+
}
14+
]
15+
}

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ docker-build: ## Build docker image with the manager.
8686
docker-push: ## Push docker image with the manager.
8787
docker push ${REGISTRY}/${IMG}:${IMG_TAG}
8888

89+
deps: ## Run dependencies for local development
90+
docker compose up -d db
91+
8992
lint-install: ## Install golangci-lint
9093
@# The following installs a specific version of golangci-lint, which is appropriate for a CI server to avoid different results from build to build
9194
go get github.com/golangci/golangci-lint/cmd/[email protected]

0 commit comments

Comments
 (0)