0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 8.2.3026: Vim9: cannot set breakpoint in compiled function

Problem:    Vim9: cannot set breakpoint in compiled function.
Solution:   Check for breakpoint when calling a function.
This commit is contained in:
Bram Moolenaar
2021-06-20 19:28:14 +02:00
parent 0d5e1ec37f
commit 4f8f54280f
7 changed files with 71 additions and 6 deletions

View File

@@ -932,6 +932,31 @@ func Test_Backtrace_DefFunction()
call delete('Xtest2.vim')
endfunc
func Test_debug_DefFunction()
CheckCWD
let file =<< trim END
vim9script
def g:SomeFunc()
echo "here"
echo "and"
echo "there"
enddef
breakadd func 2 g:SomeFunc
END
call writefile(file, 'XtestDebug.vim')
let buf = RunVimInTerminal('-S XtestDebug.vim', {})
call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"'])
call RunDbgCmd(buf,'next', ['line 3: echo "there"'])
call RunDbgCmd(buf, 'cont')
call StopVimInTerminal(buf)
call delete('Xtest1.vim')
call delete('Xtest2.vim')
endfunc
func Test_debug_def_function()
CheckCWD
let file =<< trim END