It would be helpful to have a simple option in the IDE, such as "Terminate the running application before Build". This would solve a common workflow issue and remove the need to manually close the application before rebuilding or starting a new debugging session.
As a more advanced feature, Lazarus could also support configurable Pre-build, Post-build, Pre-run, and Post-run commands or scripts. This would allow developers to automate project-specific tasks such as terminating applications, copying files, generating resources, cleaning temporary files, signing binaries, or any other custom actions.
When a project is built directly from the IDE rather than through external build scripts, it would be useful to have these additional build customization options available as part of the IDE itself.
If such an option already exists, please let me know. I couldn't find anything similar in the IDE settings or the documentation.