While debugging Go using delve only the local variables are shown.
I can't see all the global variables.
Are there any settings change to see the list of all variables
Here a is not showing, even when I hover mouse over it its value is not coming.
There is a (hidden) Delve configuration setting you can add to your settings.json file that should show your Global variables; I've only tested this on a simple project with a single main.go file, I'm not sure how reliable this is for more complex projects.
Add below to your settings.json file:
{
"go.delveConfig": {
"showGlobalVariables": true,
}
}
Answer found from @polinasok from their comment on vscode-go Issue #1683
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With