How do I debug a program written in the Go language?

前端 未结 9 1145
予麋鹿
予麋鹿 2021-02-02 06:17

How do I debug a Go program? I have been using the Gedit Go IDE, but it doesn\'t have debugging. Is there a way to step though my code and inspect memory? Or am I stuck with

9条回答
  •  春和景丽
    2021-02-02 06:45

    It's unfortunate, but the best way right now is to use print functions. The built-in print and println will work, but the functions in fmt will sometimes work better depending on what information you're after.

提交回复
热议问题