Let's say this map is s.S.Data
, it shows that the length of the map is 2, but just displays nothing. When I add expression s.S
in WATCH area, it displays correctly.
there is the sample:
package main
import (
"fmt"
)
type Some struct {
ID int
Data map[string]string
S *Some
}
func Print(s Some) {
var t Some
t = s // Breakpoint
fmt.Println(t)
if t.S != nil {
fmt.Println(t.S)
}
}
func main() {
s := Some{
ID: 2333,
Data: map[string]string{
"1": "A",
"2": "B",
},
}
ss := Some{
ID: 7777,
S: &s,
}
Print(ss)
fmt.Println("Hello, playground")
}
Is there any way to make it display correctly in VARIABLES area?