0

I am using VS Code, and while debugging if I check value of a time.Time variable/field, I get numeric value in "ext" of time.Time{} object. What would be best way to evaluate it in human readable format (something like "2020-05-09T05:00:00Z")? I tried tm.String() in watch section of debugger but get Unable to eval expression: "function calls not allowed without using 'call'"

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Jack
  • 321
  • 2
  • 4
  • 17
  • How do all normally evaluate date field value while debugging? I can add something like dtStr = dt.String() but I will have restart the debugger every time after adding the code. Is there any better solution? – Jack Jul 15 '20 at 16:36

1 Answers1

0

After just running into the same issue I've found out the debugger can indeed evaluate it by using 'call' as the error message states.

So instead of adding a watch in Visual Studio Code like this:

tm.String()

Add a watch like this:

call tm.String()

With that one call, you will get something like this in the watch window: "2020-05-09 05:00:00 +0000 UTC"

psanchez
  • 301
  • 2
  • 6