[Lazarus] I desperately need some ideas of reducing edit, compile, debug cycle

Michael Van Canneyt michael at freepascal.org
Fri Nov 26 23:48:34 CET 2010

On Fri, 26 Nov 2010, Frank Church wrote:

> One thing that has always gottem to me when using Delphi and now Lazarus is the tedious edit, compile, debug cycle. It has
> been growing worse of late that now I am beginning to dread the whole process any time I have to make some changes,
> especially when they are just minor GUI changes.
> I have to wait for what is now approaching 60Mb of debugging enabled exes to be generated every time before debugging can
> start and I'm afraid I am beginning to show signs of an ADD. I tend to approach development with what I can do in the mean
> time whilst stuff is cooking.
> The problem is the is duration too long to be staring at the screen, and too short to give something else your attention
> before coming back to it.

Why do you think this is different from any other language ?

I did quite a lot of web programming lately. JSON, Javascript and stuff.
None of that went any faster than FPC/Lazarus, in fact, they 
went lots slower.

Same with PHP. Worse even, because in PHP, you only notice 
coding errors when the interpreter actually gets there. 
It may go unnoticed for a long time. Javascript is even 
worse. Give me compiled languages any day.

In my experience, the compile cycle is the least time consuming. 
A couple of seconds, at most. No big deal.

Setting up test data, working through the login screen and several 
other screens to get to the screen I'm actually testing: 
this is the chore of debugging in 99% of the cases.

If you want to speed things up:

One thing which I've learned is that Test-Driven development makes the debugging easier.
FPCUnit (or name any other testsuite) makes the debugging process faster:
1. You clearly separate business from GUI logic.
    Once business logic is done, I'm pretty confident the code is OK.
2. The unit test apps compile quick and run quickly;
    As soon as they've run, I know the cause of the failures;
    There is seldom any need to actually debug.

What you may want to do is try and avoid windows when working with Lazarus. 
Lazarus/FPC still works significantly faster on Linux.


More information about the Lazarus mailing list