comparison src/testdir/test_debugger.vim @ 24978:2818b8108d92 v8.2.3026

patch 8.2.3026: Vim9: cannot set breakpoint in compiled function Commit: https://github.com/vim/vim/commit/4f8f54280fa728b7d5a63b67d02b60a3b3dce543 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 20 19:28:14 2021 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Jun 2021 19:30:03 +0200
parents 64b70a958f19
children 2cb78583fada
comparison
equal deleted inserted replaced
24977:8572a0949d11 24978:2818b8108d92
930 call StopVimInTerminal(buf) 930 call StopVimInTerminal(buf)
931 call delete('Xtest1.vim') 931 call delete('Xtest1.vim')
932 call delete('Xtest2.vim') 932 call delete('Xtest2.vim')
933 endfunc 933 endfunc
934 934
935 func Test_debug_DefFunction()
936 CheckCWD
937 let file =<< trim END
938 vim9script
939 def g:SomeFunc()
940 echo "here"
941 echo "and"
942 echo "there"
943 enddef
944 breakadd func 2 g:SomeFunc
945 END
946 call writefile(file, 'XtestDebug.vim')
947
948 let buf = RunVimInTerminal('-S XtestDebug.vim', {})
949
950 call RunDbgCmd(buf,':call SomeFunc()', ['line 2: echo "and"'])
951 call RunDbgCmd(buf,'next', ['line 3: echo "there"'])
952
953 call RunDbgCmd(buf, 'cont')
954
955 call StopVimInTerminal(buf)
956 call delete('Xtest1.vim')
957 call delete('Xtest2.vim')
958 endfunc
959
935 func Test_debug_def_function() 960 func Test_debug_def_function()
936 CheckCWD 961 CheckCWD
937 let file =<< trim END 962 let file =<< trim END
938 vim9script 963 vim9script
939 def g:Func() 964 def g:Func()