I use vi and command line a lot as well, but for some tasks like debugging, 
a good IDE is of great help. All you have to do is to click at the left 
margin of your source code to create a breakpoint and press F5 to reach 
there. It is almost too easy.

As far as I know, VSCode is not able to use delve attach capability yet. 
VSCode must start the program to debug it. So, by now, to attach you must 
use delve directly. It's not difficult, only that to set a breakpoint you 
should know beforehand the position you want to put your breakpoint into or 
the function name, not to get lost in a zillion foreign functions.

Let's suppose you just attached to a running program (delve command attach) 
and now you want to put a breakpoint at the source code lalala.go, line 20:
>b lalala.go:20
Or, if you know the function name:
>b myPackage.myFunction

And then, let the program continue to reach the breakpoint:
>c

I hope it helps.

On Thursday, March 2, 2017 at 12:59:54 AM UTC-3, Nyah Check wrote:
>
>
> I can't say much about IDEs since I don't really use them much. Tried 
> Atom, it was too slow for my system. I just stuck with Emacs and gedit 
> while running delve from my terminal. I don't currently know the recent 
> updates to delve. But I found it hard to debug a Go program not started by 
> delve itself. Since most of the functions and goroutines seen in the 
> debugger were not the implemented functions of my source code. I don't know 
> if anyone had that experience.
>
> Thanks,
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to