-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug: the variables was lost #1450
Comments
@Aisuko Can you try a new debug adapter if it handles variables better? Based on my experience, the new adapter handles nested, complex data structure better, but it's still experimental. |
Thank you for giving dlv-dap a try! Delve debugger has limited evaluation depth for nested variables. You would see the same limitation if you use the command-line dlv client. In the legacy adapter, this looks like a level where you no longer able to expand the variables further, even though you know the variable is nested. In the new adapter, we are planning to add requests for additional loading behind the scenes in response to user clicks to expand the parent variable (this is already working for interfaces, but not for other types yet). In the meantime, we labeled such unloaded cases with labels like "loaded 0/3", which means that 0 out of 3 children were loaded by default. At this point the workaround would be to right click on the variable and either use "Add to watch" to add these variables to the WATCH panel or "Copy Expression" to get an expression that you can type into the DEBUG CONSOLE. And please stay tune for new features which are coming shortly. |
Before: @Aisuko Could you please update dlv-dap to the very latest top-of-the tree version and give this a try with your original use case? Thank you. |
Thanks, will do and feedback. |
The version below looks like work for me(on my remote Ubuntu server), thanks for your guys patient
But I have another question(maybe a new feature request or a bug), please look at the picture below, I believe that So, is there any way can reload configuration to this feature? My configurations:
|
Closing this since the main fix has been verified. Thank you. To answer your unrelated question, if I remember correctly, "Go: Debug Test at Cursor" command is equivalent to using "debug test" codelens (link above your test function). There is a known limitation that |
@polinasok Thanks |
@Aisuko you can configure the dlv-dap to be the default debug adapter, which works for "debug test" codelens and "Go: Debug Test At Cursor" by using Reference: https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started |
@hyangah thanks |
For asking questions, see:
#vscode
channel in Gophers SlackBefore filing an issue, please review our troubleshooting guides
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Go from the VS Code integrated terminal.go version go1.16 linux/amd64
gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
The value of variable which named
AdditionalSuperuserTeams
,AdditionalTeams
andAdditionalMembers
was lost.A clear and concise description of what you expected to happen.
The expectation of the stack like below
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: