Closed CamiloGarciaLaRotta closed 3 years ago
Did you try using call err.Error()
?
I should say that call err.Error()
won't work either; there's a different error message that delve returns in that case. I'm trying to figure out exactly what change needs to be made to vim-go.
Oh thanks for the quick turnaround! Let me take it for a spin
👋🏽 @bhcleek I haven't been able to use call
. Mind clarifying the usage 🙇🏼
Here you can see I start a debugging session, and I am able to :GoDebugPrint foo
, but I am not able to call any method on foo itself even if it is part of the current stack.
:GoDebugPrint call foo.Error()
is what you're looking for
This (adding the phrase "call" before the function call) also works in vscode go debug Thanks
What did you do? (required: The issue will be closed when not provided)
:GoDebugTest
in a test file:GoDebugPrint err.Error()
What did you expect to happen?
Being able to print the result of a function call. This is currently possible for other editors relying on delve:
What happened instead?
Configuration (MUST fill this out):
vim-go version: 1.25 (just pulled from the main branch)
vimrc
you used to reproduce:vimrc
```vim let g:go_debug_mappings = { \ '(go-debug-continue)': {'key': 'c', 'arguments': 'Vim version (first three lines from
:version
):VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 1 2021 21:01:15) macOS version - x86_64 Included patches: 1-2681
Go version (
go version
):go version go1.16.5 darwin/amd64
Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration
filetype detection configuration:
filetype detection