-
Notifications
You must be signed in to change notification settings - Fork 646
The debugger doesn't show pointer values (like 0xf800000040) #1989
Comments
I usually watch |
@willfaught Can you provide a small sample code and elaborate on what you would expect vs what actually is being shown? |
This issue has been closed automatically because it needs more information and has not had recent activity. Thank you for your contributions. |
@ramya-rao-a Sure: func TestX(t *testing.T) {
var i, j int
var p = &i
var q = &j
t.Logf("%#v %#v", p, q)
} When run, you see output like:
When debugging TestX, you see these local variables: The pointer addresses for p and q aren't shown there, so you can't tell if they're equal and thus point to the same thing:
Instead, you should see something like:
There should also be a way to drill down into them to view the values they point to, like you can for the *testing.T in that same screen shot. |
Thanks for the details @willfaught This should be do-able as long as delve passes a different type for pointers. PRs are most welcome to fix this.
|
@ramya-rao-a Great, thank you! |
This feature is now available in the latest version of the Go extension (0.8.0) |
So it seems like you can't tell if two pointers point to the same thing.
Latest version of macOS High Sierra (10.13.6 (17G65)), VSCode (1.28.0), and vscode-go (0.6.91).
The text was updated successfully, but these errors were encountered: