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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user