hanrok/godebug

Goland cant make breakpoints working

Closed this issue · 7 comments

Hey,
I have been trying to make this work, standalone with you own code base.
Everything seems be working, hot reload, build etc.
But for some reason that I dont know exactly the beakpoints are not working as expected.
So when I add a breakpoint and make a nc localhost 8080 request, I can write something but after I cant see it placed on my screen ...
Any tip you can send please ?
Thanks in advanced.

Hi,
Can you please tell me what is your setup? And why are you using nc?

Hi,
thanks for your reply.
I am using Ubuntu 18.04.3 and Docker 19.03.5.
Is where I am as you can see the screen shot:

screenshot

And here it its my GoLand seems not started:

goland

Since I don't see the "Starting up repeater" and the breakpoint doesn't get hit I think it's likely to be an issue for GoLand to connect to dlv server inside the container.
I'll try to investigate it tonight, did you just checkout the repo config GoLand and run it as in the post?

Yes I checkout your repo.
But well I've added
go run main.go &

Screenshot from 2019-12-31 10-00-55

to startScript.sh and now I have:

1

But cant start debuging it.
Let me know if you figure what I am doing wrong.
Thanks

it is same. it is not working :(

Running server
API server listening at: [::]:40000
Delve PID: 8, Server PID: 19
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
2020/03/04 14:24:52 Starting up repeater

I'll take a look at that. Will make it work :)

Hi, I just ran it from scratch and it does work for me. I added README.md file to explain the steps I did to run it.
I run it on macOS Catalina? Can you please give me more details about your setup?