Skip to content

Commit

Permalink
docs: add note about overriding ddev version when debugging go (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanoii authored Nov 8, 2024
1 parent 3da819f commit 25fb1da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/blog/golang-debugging.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Debugging Golang (Go) Applications"
pubDate: 2024-05-17
# modifiedDate: 2024-04-23
modifiedDate: 2024-11-08
summary: Debugging Golang applications using GoLand or VS Code
author: Randy Fay
featureImage:
Expand Down Expand Up @@ -41,6 +41,7 @@ Once you've have your IDE working, you can start debugging.
* Change its name to the command you want to work on, like `ddev list`
* Change the "Program Arguments" to the arguments to `ddev`, like `list`
* Change the "Working Directory" to a valid DDEV project
* (optional) If you need to override the version of the built `ddev` you can add `-ldflags " -extldflags -static -X 'github.com/ddev/ddev/pkg/versionconstants.DdevVersion=v1.23.5-goland'"` to "Go tool arguments" - version `v1.23.5-goland` can be whatever you need.
* Set a breakpoint by clicking to the left of a line, for example in `cmd/ddev/cmd/list.go`
* Click the `Run` or `Debug` button on the top bar.

Expand Down

0 comments on commit 25fb1da

Please sign in to comment.