Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-01

Any tips to speed up Lazarus->GDB debugger?

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis

I am using Lazarus 1.8 Win64 , FPC 3.0.4.
As with older versions, debugger is very slow (compared to Delphi).

Is there any tricks I can use to speed up the debugger e.g. turn off debug info of all lazarus units/object files?

I remember in Delphi 5, they had an option of whether to use Debug dcu (of the main VCL units/objects files).
Is there a similar switch I can use to disable debugger in all, except my own source code so as to speed up the debugger?

Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180111/488d751c/attachment.html>

Reply by email

Luiz Americo Pereira Camara
to Dennis

2018-01-11 12:13 GMT-03:00 Dennis via Lazarus <

Show quoted text 5 lines
: I am using Lazarus 1.8 Win64 , FPC 3.0.4. As with older versions, debugger is very slow (compared to Delphi).

By slow you mean slow to compile or slow when stepping the code?

If the later, close the callstack window while stepping in the code

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180111/76646f18/attachment.html>

Reply by email

Martin Frb
to Dennis: I am using Lazarus 1.8 Win64 , FPC 3.0.4. As with older versions, debugger is very slow…
Dennis wrote 10 lines
I am using Lazarus 1.8 Win64 , FPC 3.0.4. As with older versions, debugger is very slow (compared to Delphi). Is there any tricks I can use to speed up the debugger e.g. turn off debug info of all lazarus units/object files? I remember in Delphi 5, they had an option of whether to use Debug dcu (of the main VCL units/objects files). Is there a similar switch I can use to disable debugger in all, except my own source code so as to speed up the debugger?

Not really...

There is the fpdebug package (its part of the install). It is faster, but very basic, and many things do not depends what you want to speed up.

The time F9 needs to start your app? Sorry nothing can be done. Same for stepping with F7/F8.

Note, you can do the next step, before all your watches have been evaluated.
If you find it irritating to wait for those, you can open the history, stack and watches window, and use the power button to power them off.

Evaluation of watches.
You can compile with DBG_WITH_GDB_WATCHES
Then you can add watches as follow

-data-evaluate-expression SomeVariable

If you have lots of watches, you should notice that they evaluate faster. But the IDE will no longer try to deal with the pascal syntax. So you may have to add deref of some hidden refs yourself. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180111/d09c1793/attachment.html>

Reply by email

Martin Frb
to Dennis: I am using Lazarus 1.8 Win64 , FPC 3.0.4. As with older versions, debugger is very slow…
Dennis wrote 5 lines
I remember in Delphi 5, they had an option of whether to use Debug dcu (of the main VCL units/objects files). Is there a similar switch I can use to disable debugger in all, except my own source code so as to speed up the debugger?

To add to my other reply

You can compile LCL, and package without debug info.

See package options for each package, or additions and overrides. (and you can modify lib path, so maybe keep several versions...)

If you do, you may save 1 second of the start time. (actually not sure if the time is saved during start, or at some later point) Depends on the gdb version. And your computer speed. With the latest gdb savings will be way below a second.... You can also try gdb 8. That may save half a second.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180111/b3e8e1ce/attachment.html>

Reply by email

Luca Olivetti
to Martin Frb

El 11/01/18 a les 18:45, Martin Frb via Lazarus ha escrit:

Show quoted text 15 lines
On 11/01/2018 15:13, Dennis via Lazarus wrote: > > I remember in Delphi 5, they had an option of whether to use Debug dcu > (of the main VCL units/objects files). > Is there a similar switch I can use to disable debugger in all, except > my own source code so as to speed up the debugger? To add to my other reply You can compile LCL, and package without debug info. See package options for each package, or additions and overrides. (and you can modify lib path, so maybe keep several versions...) If you do, you may save 1 second of the start time. (actually not sure if the time is saved during start, or at some later point)

And then lose 10 minutes because you need to trace a routine in the LCL. And an hour more because you discover that the routine is actually in the RTL ;-)

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email