[Lazarus] Do I really need to use Build to get all recent changes included?

Bo Berglund bo.berglund at gmail.com
Sat Mar 27 10:15:55 CET 2021

I am using Lazarus 2.0.8 / Fpc 3.0.4 on a RaspberryPi4
I am writing a program intended to be run as a systemd service on Linux, so no
GUI components.

While debugging code on this I have noted a strange Lazarus behaviour:
- Edit the source in order to for example add a debug log line
- Use Run/Compile to get a new binary
- Use strip -s to reduce the executable size
- scp the executable to the target system (8400 km away)
- Run the executable on the target system

Now when I run a cycle on the target through the newly created binary the log
line does *not* appear!

So back to the dev system and use Run/Build instead
Then repeat the strip-scp-run sequence

And NOW the log line appears in the target system log!

Should not Run/Compile create the binary based on *all* the latest sources?
If I use Run/Build I am going to increment the build number all the time while
debugging, which I would rather avoid.

Is there some Lazarus setting I am unaware of, which will force Compile to
actually compile based on all the modified sources since last compile?

Or does Lazarus only consider changed files which are marked in the IDE as
If so then my use of AutoSave is the problem??? It saves changed sources every 5

Bo Berglund
Developer in Sweden

More information about the lazarus mailing list