patch 8.2.3395: Vim9: expression breakpoint not checked in :def function
Problem: Vim9: expression breakpoint not checked in :def function.
Solution: Always compile a function for debugging if there is an expression
breakpoint. (closes #8803)
diff --git a/src/vim9.h b/src/vim9.h
index 67c9a71..0fc1ab5 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -513,14 +513,14 @@
// Keep in sync with COMPILE_TYPE()
#ifdef FEAT_PROFILE
# define INSTRUCTIONS(dfunc) \
- (debug_break_level > 0 || dfunc->df_ufunc->uf_has_breakpoint \
+ (debug_break_level > 0 || may_break_in_function(dfunc->df_ufunc) \
? (dfunc)->df_instr_debug \
: ((do_profiling == PROF_YES && (dfunc->df_ufunc)->uf_profiling) \
? (dfunc)->df_instr_prof \
: (dfunc)->df_instr))
#else
# define INSTRUCTIONS(dfunc) \
- (debug_break_level > 0 || dfunc->df_ufunc->uf_has_breakpoint \
+ (debug_break_level > 0 || may_break_in_function(dfunc->df_ufunc) \
? (dfunc)->df_instr_debug \
: (dfunc)->df_instr)
#endif