diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 06:34:43 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 06:46:17 +0800 |
commit | 5ce3b89ff354e3e43d323b49f92dbce3bdd191c8 (patch) | |
tree | fb3c3ac42cefe4dd57bb2d8dee4c31a143e238c9 | |
parent | 03c3f7887dbc26c4246ea2eeb135453f3f3ee000 (diff) | |
download | rneovim-5ce3b89ff354e3e43d323b49f92dbce3bdd191c8.tar.gz rneovim-5ce3b89ff354e3e43d323b49f92dbce3bdd191c8.tar.bz2 rneovim-5ce3b89ff354e3e43d323b49f92dbce3bdd191c8.zip |
vim-patch:8.2.2985: Vim9: a compiled function cannot be debugged
Problem: Vim9: a compiled function cannot be debugged.
Solution: Add initial debugging support.
https://github.com/vim/vim/commit/e99d422bbd3e47620915bf89671673f0711671b4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_debugger.vim | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/old/testdir/test_debugger.vim b/test/old/testdir/test_debugger.vim index ba3f4715ca..6b9fc9033b 100644 --- a/test/old/testdir/test_debugger.vim +++ b/test/old/testdir/test_debugger.vim @@ -923,19 +923,20 @@ func Test_Backtrace_DefFunction() \ ':debug call GlobalFunction()', \ ['cmd: call GlobalFunction()']) - " FIXME: Vim9 lines are not debugged! - call RunDbgCmd(buf, 'step', ['line 1: source Xtest2.vim']) + call RunDbgCmd(buf, 'step', ['line 1: CallAFunction()']) - " But they do appear in the backtrace + " FIXME: not quite right call RunDbgCmd(buf, 'backtrace', [ \ '\V>backtrace', - \ '\V 2 function GlobalFunction[1]', - \ '\V 1 <SNR>\.\*_CallAFunction[1]', - \ '\V->0 <SNR>\.\*_SourceAnotherFile', - \ '\Vline 1: source Xtest2.vim'], + \ '\V->0 function GlobalFunction', + \ '\Vline 1: CallAFunction()', + \ ], \ #{match: 'pattern'}) - + call RunDbgCmd(buf, 'step', ['line 1: SourceAnotherFile()']) + call RunDbgCmd(buf, 'step', ['line 1: source Xtest2.vim']) + " FIXME: repeated line + call RunDbgCmd(buf, 'step', ['line 1: source Xtest2.vim']) call RunDbgCmd(buf, 'step', ['line 1: vim9script']) call RunDbgCmd(buf, 'step', ['line 3: def DoAThing(): number']) call RunDbgCmd(buf, 'step', ['line 9: export def File2Function()']) @@ -952,7 +953,7 @@ func Test_Backtrace_DefFunction() \ #{match: 'pattern'}) " Don't step into compiled functions... - call RunDbgCmd(buf, 'step', ['line 15: End of sourced file']) + call RunDbgCmd(buf, 'next', ['line 15: End of sourced file']) call RunDbgCmd(buf, 'backtrace', [ \ '\V>backtrace', \ '\V 3 function GlobalFunction[1]', @@ -962,7 +963,6 @@ func Test_Backtrace_DefFunction() \ '\Vline 15: End of sourced file'], \ #{match: 'pattern'}) - call StopVimInTerminal(buf) call delete('Xtest1.vim') call delete('Xtest2.vim') @@ -1156,6 +1156,7 @@ func Test_debug_backtrace_level() \ [ 'E121: Undefined variable: s:file1_var' ] ) call RunDbgCmd(buf, 'echo s:file2_var', [ 'file2' ] ) + call RunDbgCmd(buf, 'cont') call StopVimInTerminal(buf) call delete('Xtest1.vim') call delete('Xtest2.vim') |