Hi @Martin_fr, really sorry my poor use of terms. Yep, just a standard unit (I'd be more at home with the DLLs). I'm used to saying library as a set of tools one has built up.
Perfectly fine use for the word. But human language just has ambiguity...
I assume that if just a standard unit, that it would come under the umbrella of the project debug settings. Are there additional settings or code to make a unit behave in a different way?
Yes...
But, let me ask how you use it.
In the below the word "package" should always mean "a lazarus package / lpk".
That is, if you have a library (aka collection) of units, then I guess you use it for several projects? So do you have it in some folder, and add that folder to your project's path settings (the IDE would ask you if it should do that, when you add the unit to the project (not open it, but add it).
Ok, one step back, to much terminology.
You have your project, in folder c:\foo. If you open the "Project inspector" the files are listed there.
You have your unit from the collection C:\mystuff\frame.pas
You can open it in the editor => but that does
not add it to the projectYou can add it to the "uses" in one of your other units: afaik/iirc "uses frame in 'C:\mystuff\frame.pas'; " => but that does
not add it to the project"not add it to the project"
=> it wont be listed in the files of the project inspector
=> the IDE will not (always) deal with it, e.g. make sure it gets recompiled when it changed
So in the project inspector: "add" it. Then you get ask about the path being added, and the uses does not need "in c:....."
(Or really better: Invest time, and learn how to put your unit-collection into a package).
Of course you can add the path to the project without adding the file...
And then, if it is in a package => make sure the path is
not added to the project.
In any case if the file is not in a package, then the project build settings (debug info) is used for the file. But the compiled result of the file may be outdated, and still be according to an older setting. (to remedy that, search all folder for .ppu files (and .o file) of your unit, and remove those. If you found more than one ppu for the one unit => there is something really bad in your setup.
You can always see if the file has debug info, by checking for the blue dots in the gutter.
That is kind of the first thing to check
- Has blue dots?
- Breakpoint are red, and get a checkmark "V" when the debugger runs?