These are chat archives for derekparker/delve

10th
Oct 2015
Donald Adu-Poku
@dnldd
Oct 10 2015 03:53
Hi everyone, I tried setting a breakpointbreak main.main:16 but it failed with the message
Command failed: no code at .../server.go:27
Donald Adu-Poku
@dnldd
Oct 10 2015 03:59
I'm unsure why it's trying to set the breakpoint at line 27 when I specified line 16.
did I do something wrong?
Donald Adu-Poku
@dnldd
Oct 10 2015 04:15
also changing my project’s package name to anything other than main results in this error could not launch process: invalid magic number in record at byte 0x0
I’m on OS X Yosemite btw
Seth W. Klein
@sethwklein
Oct 10 2015 04:17
try something like server. go:16
To test a library (anything not package main,) test it.
Donald Adu-Poku
@dnldd
Oct 10 2015 04:23
This message was deleted
This message was deleted
@sethwklein tried that, I got Location "server.go:16" ambiguous: .../server.go, .../Cellar/go/1.5.1/libexec/src/net/http/server.go
@sethwklein that’s why I was specfiying the package name
Seth W. Klein
@sethwklein
Oct 10 2015 04:29
The .../ matters. There's a command to list files.
Er, that's 3 dots, not the two I was thinking of, but still.
Donald Adu-Poku
@dnldd
Oct 10 2015 04:31
@sethwklein Location "server.go:16" ambiguous: /Users/dnldd/Work/surfline/server.go, /usr/local/Cellar/go/1.5.1/libexec/src/net/http/server.go that’s the entire output
Seth W. Klein
@sethwklein
Oct 10 2015 04:37
Lemme finish this game. Then I can reproduce and show you how to disambiguate.
Donald Adu-Poku
@dnldd
Oct 10 2015 04:37
ok man thanks :thumbsup:
Seth W. Klein
@sethwklein
Oct 10 2015 04:56
@dnldd Yeah, just specify the full path name. Cut and paste helps. Or maybe you could submit a pull request to search for relative paths relative to the current directory :smile:
Donald Adu-Poku
@dnldd
Oct 10 2015 05:03
@sethwklein thanks man, that worked. looking into that PR actually. Starting off here: https://github.com/derekparker/delve/blob/master/terminal/command.go#L538
Donald Adu-Poku
@dnldd
Oct 10 2015 05:29
for anyone interested it looks like locations.gois the place to tiinker with this. https://github.com/derekparker/delve/blob/master/service/debugger/locations.go#L48
Alessandro Arzilli
@aarzilli
Oct 10 2015 05:40
@dnldd main.main:16 is the 16th line of the main function, you should be able to disambiguate with surfline/server.go:16
Donald Adu-Poku
@dnldd
Oct 10 2015 05:46
@aarzilli Yup works. That’s what I needed. Thank you :)