Mercurial > vim
diff src/vim9execute.c @ 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 | 71b1e2ef0069 |
children | eac6e5a94e9d |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1473,14 +1473,14 @@ handle_debug(isn_T *iptr, ectx_T *ectx) // check for the next breakpoint if needed breakpoint = dbg_find_breakpoint(FALSE, ufunc->uf_name, - iptr->isn_lnum - 1); + iptr->isn_arg.debug.dbg_break_lnum); if (breakpoint <= 0 || breakpoint > iptr->isn_lnum) return; } SOURCING_LNUM = iptr->isn_lnum; debug_context = ectx; - debug_var_count = iptr->isn_arg.number; + debug_var_count = iptr->isn_arg.debug.dbg_var_names_len; for (ni = iptr + 1; ni->isn_type != ISN_FINISH; ++ni) if (ni->isn_type == ISN_DEBUG @@ -5476,8 +5476,10 @@ list_instructions(char *pfx, isn_T *inst break; case ISN_DEBUG: - smsg("%s%4d DEBUG line %d varcount %lld", pfx, current, - iptr->isn_lnum, iptr->isn_arg.number); + smsg("%s%4d DEBUG line %d-%d varcount %lld", pfx, current, + iptr->isn_arg.debug.dbg_break_lnum + 1, + iptr->isn_lnum, + iptr->isn_arg.debug.dbg_var_names_len); break; case ISN_UNPACK: smsg("%s%4d UNPACK %d%s", pfx, current,