I am new to go, delve and GoLand IDE. I would like to remote debug some REST endpoints that are deployed using make
and run in a docker (using docker + docker-compose).
The command I use to bring up my environment is make myproject
My endpoints get hosted at: localhost:8080
When creating a debug configuration in GoLand it specifies that before running
dlv debug --headless --listen=:2345 --api-version 2
, do the following:
go build -gcflags='-N -l' github.com/myproject
dlv --listen=:2345 --headless=true --api version=2 exec ./myproject
Is there a way for me to attach to my project once it's running on localhost:8080? How will these commands differ if that is the case?
Thanks in advance