Mercurial > vim
diff src/testdir/test_debugger.vim @ 25004:70f55a30f03c v8.2.3039
patch 8.2.3039: Vim9: breakpoint at a comment line does not work
Commit: https://github.com/vim/vim/commit/8cec9273d2518f2a9abcbd326722a2eba38d2a13
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 23 20:20:53 2021 +0200
patch 8.2.3039: Vim9: breakpoint at a comment line does not work
Problem: Vim9: breakpoint at a comment line does not work.
Solution: Add the comment line number to the debug instruction.
(closes #8429)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Jun 2021 20:30:03 +0200 |
parents | 2cb78583fada |
children | 671ded1facd5 |
line wrap: on
line diff
--- a/src/testdir/test_debugger.vim +++ b/src/testdir/test_debugger.vim @@ -947,7 +947,7 @@ func Test_debug_DefFunction() def LocalFunc() echo "first" echo "second" - breakadd func 1 LegacyFunc + breakadd func LegacyFunc LegacyFunc() enddef @@ -1010,6 +1010,13 @@ func Test_debug_def_function() eval 1 enddef enddef + def g:FuncComment() + # comment + echo "first" + .. "one" + # comment + echo "second" + enddef END call writefile(file, 'Xtest.vim') @@ -1049,6 +1056,12 @@ func Test_debug_def_function() \ ['cmd: call FuncWithDict()']) call RunDbgCmd(buf, 'step', ['line 1: var d = { a: 1, b: 2, }']) call RunDbgCmd(buf, 'step', ['line 6: def Inner()']) + call RunDbgCmd(buf, 'cont') + + call RunDbgCmd(buf, ':breakadd func 1 FuncComment') + call RunDbgCmd(buf, ':call FuncComment()', ['function FuncComment', 'line 2: echo "first" .. "one"']) + call RunDbgCmd(buf, ':breakadd func 3 FuncComment') + call RunDbgCmd(buf, 'cont', ['function FuncComment', 'line 5: echo "second"']) call RunDbgCmd(buf, 'cont') call StopVimInTerminal(buf)