These are chat archives for derekparker/delve

12th
Sep 2017
Ulysses Domiciano Souza
@ulyssessouza
Sep 12 2017 09:36
Hello! I'm having a problem when trying to setup breakpoints... I get an unknown file when trying to debug on remote
Do someone have a clue about it?
Ulysses Domiciano Souza
@ulyssessouza
Sep 12 2017 11:30
$ (dlv) b main.go:12
Command failed: Location "main.go:11" not found
but the client successfuly connected to the dlv server
Alessandro Arzilli
@aarzilli
Sep 12 2017 12:40
@ulyssessouza we'll need a lot more context than that
Ulysses Domiciano Souza
@ulyssessouza
Sep 12 2017 15:12
Ok... I have a linux host, running another linux on virtualbox that runs my program in side a docker container, but since I expose the port I think it's ok
@aarzilli my program is built with "go build -gcflags='-N -l'" and the binary is copied somewhere else (outside the source root) to be executed (/etc) in my case
@aarzilli Then I run delve with "dlv --listen=:2345 --headless=true --api-version=2 exec <path_to_binary>"
Ulysses Domiciano Souza
@ulyssessouza
Sep 12 2017 15:17
@aarzilli In the client side, with "dlv connect <VM_IP>:2345" I can connect to the dlv server, but I'm unable to set any breakpoint
Alessandro Arzilli
@aarzilli
Sep 12 2017 16:20
none of this would explain that error message, the most likely explanation is that there is no main.go file involved in the creation of your executable