-
Notifications
You must be signed in to change notification settings - Fork 645
Debug: Failed to eval expression with watches #3006
Comments
Thanks for reporting @andig Unfortunately, the extension is not aware of which watches exist in the current scope and which don't. Therefore, I don't see a good way to suppress these errors that come from delve. @quoctruong any ideas? |
Thanks for taking up this request!
In that case I would suggest to suppress all errors or that type or potentially use the errors to provide dynamic filtering of the watches (greyed out or hidden = did error and is hence not available). It seems the errors are recognizable as such. Might also make sense to work with delve to not even send these as they're really meaningless in this context. At any rate I'd not expect them mixed with the application's output- wouldn't mind if they appeared in the vscode terminal window instead;) |
Do you see this even without setting the |
Where could I check? The only go setting I've really tweaked is enabling of the language server. |
You can set the |
I feel stupid, but there is no "debug configuration" or
|
@andig, you can add the key to the configuration. This is mine as an example:
@ramya-rao-a, even with |
Agree on needing some sort of solution for this - hard to see the real errors when every step displays a whole bunch of watch errors. |
I agree on these errors being noise. I've made this change that you can try out in the latest beta version of this extension. |
LGTM- I've only tested the "regular" case without setting log to any non-default value. |
Thanks @andig The fix associated with this issue is now available in the latest version of the extension |
What version of Go, VS Code & VS Code Go extension are you using?
Run
go version
to get version of Gogo version go1.13.6 darwin/amd64
Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders1.41.1
26076a4de974ead31f97692a0d32f90d735645c0
x64
Check your installed extensions to get the version of the VS Code Go extension
0.12.0
Run
go env GOOS GOARCH
to get the operating system and processor arhcitecture detailsdarwin
amd64
Describe the bug
During debugging, with some watches added, the debug console gets flowed with lengthy output of
as soon as a breakpoint is hit. The problem seems to be that obviously not all watches exist in the same scope (or maybe same goroutine) and vscode-go/delve errors on the ones that are not accessible.
Instead, these errors should be suppressed (or go to the terminal window) and not clutter the debug console that shows the application output.
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: