Feature request: show time strings in debug inline values #1176
Replies: 4 comments
-
I also notice that if I add the time variable
and
in the Watch window. Displaying the string values directly could also help a lot in this case. |
Beta Was this translation helpful? Give feedback.
-
That's a neat idea. I know in languages like JavaScript, I see a string representation of the date object and I can use watches to get more info about a variable, including date objects: For Go, this doesn't work right now. Not even watches: The error under watches is It tells me it's a time struct but nothing more than that. It'd be nice if it displayed one of the formatted time strings next to it in the debugger. Personally, I'd like it both in the bar on the left and for inline when you mouse over a variable while debugging. |
Beta Was this translation helpful? Give feedback.
-
cc @polinasok @suzmue what do you think about adding this in the new delve dap? |
Beta Was this translation helpful? Give feedback.
-
Adding to debugging time with Having the time string feature would be really nice, even with some delay in presenting the strings (due to the safe point issue?) |
Beta Was this translation helpful? Give feedback.
-
Referring to closed Delve issue. Perhaps this request is more valid for the
vscode-go
extension?In my debug sessions I have a time variable
t
, for this variable I can seein the
Run
side bar, andin the debugging inline values, highlighted in the editor.
When I e.g do recursion and use pointer variables, the memory address of the variables is nice to have immediate eyesight upon. However, I spend a significant amount of time cycling through
in the debug console.
My question is: do we need to have variable type and memory address shown both in debug side bar and inline values?
I naively suggest to print
(t time.Time).String()
and(d time.Duration).String()
in either the debug inline values or debug side bar, for all time and duration variables. This feature would speedup my debug sessions significantly, thanks.Beta Was this translation helpful? Give feedback.
All reactions