title: Remote Debugging HTTP requests using Go and GoLand IDE
body: <p>I am new to go, delve and GoLand IDE. I would like to remote debug some REST endpoints that are deployed using <code>make</code> and run in a docker (using docker + docker-compose). </p>
  
  <p>The command I use to bring up my environment is <code>make myproject</code></p>
  
  <p>My endpoints get hosted at: <code>localhost:8080</code></p>
  
  <p>When creating a debug configuration in GoLand it specifies that before running
  <code>dlv debug --headless --listen=:2345 --api-version 2</code>, do the following: </p>
  
  <pre><code>go build -gcflags='-N -l' github.com/myproject
  dlv --listen=:2345 --headless=true --api version=2 exec ./myproject
  </code></pre>
  
  <p>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? </p>
  
  <p>Thanks in advance</p>