Here is an additional patch, that may improve the debugging of generics.
https://gitlab.com/martin_frb/lazarus/-/commit/3e9e3af5e27fdc297b6346564e6ce58e8afbabc7This is for cases, if the unit providing the generic is in a different folder (or package / eg compiled into ppu outside the compilation of the project).
I did some quick test, and it appears to work. I will have to do more tests.
If you can, I appreciate if you test it too.
If there are include files,
- where several include files have the same name (without path)
- have no source / or were pre-compiled by someone else (so the source is not in the expected place)
Then lines between those may be mixed.
This may (most likely) have happened already before. But it may have increased now.
However, this can not fully be avoided (or only at very high cost).
Since (even if the before linked fpc bug did not exist) the full filenames in the debug info may be incorrect, the debugger must account for that => the debugger must find the file by its base name.
The debugger tries the full name (with path) first. If that succeeds it will prefer that.
(except blue dots, here it may
now (with that patch) always pull in the "name only" => but a breakpoint set would prefer the fullname only, if available)