Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Go (golang) code in Windows

What is the best method of debugging go code in Windows?

https://stackoverflow.com/a/5514122/201618 states the GBD cannot be used as

Windows and ARM binaries do not contain DWARF debugging information and, as such, cannot be inspected with GDB.

https://stackoverflow.com/a/3405768/201618 implies that the best thing to do is just use fmt.Println

Is there a better current option? Is there a better planned future option?

like image 200
Alistair Collins Avatar asked Aug 01 '13 11:08

Alistair Collins


People also ask

How do I debug a go file?

To debug a program, execute the dlv debug command. Attach the filename at the end of this command, and debugging will start. For example, if you want to debug the main.go file, run the command dlv debug main.go . It is also known as “delve server” because this is a running process waiting for instructions.


1 Answers

In addition to GDB you can use Zeus. Also, take a look to comparison of IDEs for Google Go.

like image 86
Mihai8 Avatar answered Sep 18 '22 15:09

Mihai8