[Lazarus] What lines of a project run

Martin Frb lazarus at mfriebe.de
Mon Aug 10 20:32:31 CEST 2015


On 10/08/2015 18:35, Aradeonas wrote:
> So there isnt any option or implement in debugger that it log what 
> lines it go and it compile?

You are looking for complied or executed lines?

Compiled lines: just look for the blue dots, while the debugger runs
Executed lines: No current plan.


For executed lines this needs a specially optimized debugger. If you do 
that with gdb in the IDE, your app would run really slow.
Even in valgrind, an app can slow down by a factor of 30 to 50. (values 
estimated from memory).

The IDE+gdb based debugger is not fit for that. If someone wants to do 
that based on the new fpdebug, that may be possible. But that needs a 
volunteer.

> I dont know much about compilers but when it know what lines it run 
> and debug so it can write it some where.
>
You can single step the app in the IDE (of course you need to keep 
pressing F7), the IDE will record the last 20 lines in the Debug-history 
window. But this kind of single stepping is very very slow.

valgrind also uses single stepping. but because it is not doing all the 
tasks other debuggers would do, it ends up with a slowdown that makes it 
still possible (though sometimes painful) to run an app.

Without single stepping, your app would need to log the info from 
within. But the complier does not do that. There is fpprofiler. It does 
not do what you want, but it can probably be modified to do it. It takes 
your source before compilation, and inserts extra statements 
(preprocessing).
So all you need is to insert (automatically) one log-statement on each line.




More information about the Lazarus mailing list