Recent

Author Topic: Testers needed - Skip methods while single stepping  (Read 311 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12208
  • Debugger - SynEdit - and more
    • wiki
Testers needed - Skip methods while single stepping
« on: February 08, 2026, 05:10:28 pm »
For those using an RTL with debug info, or those wanting to step into some parts of the LCL but not others...

In Lazarus 4.99 you can now set the debugger to SKIP some functions while doing "step in". I.e. for those function "step in" becomes a "step over".

This matters, e.g for code like
Code: Pascal  [Select][+][-]
  1. foo.DoVirtualMethod(Uppercase(MyString + MyOtherString));

When you try to single step into DoVirtualMethod, then the debugger might first step into
- fpc_ansi_string_concat
- uppercase
- fpc_check_object
If any of those have debug info.

If you have reasons preventing you from compiling the relevant units without debug info (e.g. you may need to debug into other parts of the RTL) then you can now add those functions to an ignore list, and "step in" will skip them.





Settings are under
Tools > Options > Debugger > Stepping exclusions
Project > Project options > Debugger > Stepping exclusions

For FPDEBUG

Each exclusion can be limited to a file. Filename will compare the filename (that may not be the unit name, if you have an include file) with/without extension. Regex can match filename or path.

If only a file/path is given then any functions within will be skipped.

Otherwise functions will be skipped if they match the file/path AND the function name/regex. (FPC build in procs can have names including $ signs / that is whatever the compiler does)

If no path is given, only the name will be checked.

GDB > 7.4
Uses the GDB "skip" function.

Matches may be case sensitive. The IDE will automatically add all uppercase versions (for regex) to match Dwarf2 uppercased debug info.

Proc-Name Regex (supported by GDB 8.0 and above) are limited to posex.

GDB 7.n only supports NON regex. Either a filename or a function name.

GDB 8
- regex (posex) for function names
- regex (file) with ONLY . and .* => will be translated into file-globs regex ".*ab.d" becomes glob "*ab?d"

LLDB

Only supports function names. No filename/path checks.

Regex are posex and case-sensitive (again all uppercase is added).

LLDB supports a single regex, so if you configure multiple checks, the IDE builds one large regex
  (pattern1)|(pattern2)|(^name1$)

If any single one of them is malformed, then the entire resulting check for all of them will fail.



 

TinyPortal © 2005-2018