Skip to content

Vim/NVim freeze with GoDebugStop with Telepresence V2 #3432

Open
@Hoomanfr

Description

@Hoomanfr

What did you do? (required: The issue will be closed when not provided)

I used telepresence to route proxy to my local for sake of local debugging a service hosted in k8. everything's fine till I call GoDebugStop then the entire vim/neovim freeze and I have to reopen the vim/neovim again. I'm using vim(8.1.3741) and neovim(0.4.3).
the error log is:

Error detected while processing function go#debug#Stop:
15332 line    3:
15333 E184: No such user-defined command: Last

If possible, please provide clear steps for reproducing the problem.

- Telepresence intercept <tp-srv-name> --service <k8-srv-name> --port <routing-port> --env-file=<env-file-name>
- :source <env-file-name> | GoDebugStart
- Curl a simple get endpoint in terminal
- The vim-go captures debug breakpoint successfully
- :GoDebugContinue will successfully continue and will receive result in terminal
- :GoDebugStop -> the editor will freeze!

What did you expect to happen?

  • Stop the debugger

What happened instead?

  • vim/nvim freeze

Configuration (MUST fill this out):

let g:go_snippet_case_type = 'camelcase'
let g:go_auto_type_info = 1
let g:go_debug_mappings = {
      \ '(go-debug-continue)': {'key': 'c', 'arguments': '<nowait>'},
      \ '(go-debug-next)': {'key': 'n', 'arguments': '<nowait>'},
      \ '(go-debug-step)': {'key': 's'},
      \ '(go-debug-print)': {'key': 'p'},
\}

" \ 'goroutines': 'botright 10new',
let g:go_debug_windows = {
      \ 'vars':       'leftabove 30vnew',
      \ 'stack':      'leftabove 20new',
      \ 'out':        'botright 5new',
\ }
filetype plugin indent on
map <leader>ds :GoDebugStart<cr>
map <leader>dt :GoDebugStop<cr>
map <leader>db :GoDebugBreakpoint<cr>

vim-go version:

1.26

vimrc you used to reproduce:

call plug#begin()
Plug 'morhetz/gruvbox'
Plug 'preservim/nerdtree'
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'elzr/vim-json'
Plug 'brooth/far.vim'
Plug 'preservim/nerdcommenter'
Plug 'Xuyuanp/nerdtree-git-plugin'
"""Autocomplete Plug start
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
"""Autocomplete Plug end
Plug 'SirVer/ultisnips'
call plug#end()
set hidden
set nu
set hlsearch
"""Autocomplete start
let g:deoplete#enable_at_startup = 1
call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' })
"""Autocomplete end

"""Ctrlp Start
let g:ctrlp_working_path_mode = 'ra' "r: the nearest ancestor that contains one of these directories or files: .git .hg .svn .bzr - a: like c, but only if the current working directory outside of CtrlP is not a direct ancestor of the directory of the current file.
set wildignore+=*/tmp/*,*.so,*.swp,*.zip     " MacOSX/Linux
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git|hg|svn)$',
  \ 'file': '\v\.(exe|so|dll)$',
  \ 'link': 'some_bad_symbolic_links',
  \ }
let g:ctrlp_user_command = 'find %s -type f'        " MacOSX/Linux
let g:ctrlp_reuse_window  = 'startify'
let g:ctrlp_working_path_mode = ''
"""Ctrlp End

"""vim-go start
let g:go_snippet_case_type = 'camelcase'
let g:go_auto_type_info = 1
let g:go_debug_mappings = {
      \ '(go-debug-continue)': {'key': 'c', 'arguments': '<nowait>'},
      \ '(go-debug-next)': {'key': 'n', 'arguments': '<nowait>'},
      \ '(go-debug-step)': {'key': 's'},
      \ '(go-debug-print)': {'key': 'p'},
\}

" \ 'goroutines': 'botright 10new',
let g:go_debug_windows = {
      \ 'vars':       'leftabove 30vnew',
      \ 'stack':      'leftabove 20new',
      \ 'out':        'botright 5new',
\ }
filetype plugin indent on
map <leader>ds :GoDebugStart<cr>
map <leader>dt :GoDebugStop<cr>
map <leader>db :GoDebugBreakpoint<cr>
"""vim-go end

Vim version (first three lines from :version):

VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32)
Included patches: 1-2269, 3612, 3625, 3669, 3741
Modified by [email protected]

Nvim version (first three lines from :version):

NVIM v0.4.3
Build type: Release
LuaJIT 2.1.0-beta3

Go version (go version):

1.18

gopls version

v0.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions