[Lazarus] Any tips to speed up Lazarus->GDB debugger?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Any tips to speed up Lazarus->GDB debugger?

Free Pascal - Lazarus mailing list
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

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Any tips to speed up Lazarus->GDB debugger?

Free Pascal - Lazarus mailing list


2018-01-11 12:13 GMT-03:00 Dennis via Lazarus <[hidden email]>:
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

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Any tips to speed up Lazarus->GDB debugger?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 11/01/2018 15:13, Dennis via Lazarus wrote:
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 work at all.

Well 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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Any tips to speed up Lazarus->GDB debugger?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
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)
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.



--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Any tips to speed up Lazarus->GDB debugger?

Free Pascal - Lazarus mailing list
El 11/01/18 a les 18:45, Martin Frb via Lazarus ha escrit:

> 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
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus