Delve - instruct binary to wait for client to connect

554 Views Asked by At

I'm currently developing a plugin for a product. This product invokes this plugin, written in GO, which runs for a very short time.

Because it runs so quickly, it makes it very hard (almost impossible with my knowledge) to attach delve client to it.

Is there a way we can instruct the plugin binary to stop execution and wait for delve client to connect?

P.S. Right now I'm inserting fmt.Scanln() in main() as a workaround. It's not a big issue to continue using this approach if there are no alternatives.

0

There are 0 best solutions below