Skip to content

Commit

Permalink
feat: enable convenient vscode debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonly committed Oct 25, 2022
1 parent 43b259b commit 5e444c3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ vendor/
go.work

.vscode/*
!.vscode/launch.json
.idea

# Local History for Visual Studio Code
Expand Down
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "envd up",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/debug-bin/envd",
"cwd": "directory containing build.envd",
"args": [
"up"
]
}
]
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ generate: mockgen-install ## Generate mocks
# It is used by vscode to attach into the process.
debug-local:
@for target in $(TARGETS); do \
CGO_ENABLED=$(CGO_ENABLED) go build -trimpath \
CGO_ENABLED=$(CGO_ENABLED) go build \
-v -o $(DEBUG_DIR)/$${target} \
-gcflags='all=-N -l' \
$(CMD_DIR)/$${target}; \
Expand Down

0 comments on commit 5e444c3

Please sign in to comment.