【问题标题】:Visual Studio Code - Golang debugging: How to see the value of a pointer time.Time?Visual Studio Code - Golang 调试:如何查看指针 time.Time 的值?
【发布时间】:2019-09-27 22:56:33
【问题描述】:

我正在使用 Visual Studio Code 调试 Golang 项目,但我不知道如何读取指向 time.Time 变量的指针的值。

这是一个例子:

我不确定wall, ext, loc 代表什么,我可以在这里读取值的唯一方法是添加一个日志命令:

log.Infof("%v", paymentAt.Format("20060102"))

有没有更好的方法在调试时查看值?

【问题讨论】:

    标签: debugging go visual-studio-code


    【解决方案1】:

    目前没有。在幕后,Visual Studio Code 使用 delve 进行调试,他们有一个开放的请求来添加此功能:

    https://github.com/go-delve/delve/issues/999

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-28
      • 2019-01-24
      • 1970-01-01
      • 2018-04-22
      • 1970-01-01
      • 1970-01-01
      • 2018-03-11
      • 1970-01-01
      相关资源
      最近更新 更多