Recent

Author Topic: fpc debugger  (Read 3527 times)

guest59697

  • Guest
fpc debugger
« on: May 23, 2018, 10:47:55 am »
hello Thaddy, hello community,

I like ask you if the debugger of FPC will be enhanced to be similar as the Delphi counterpart (example to be able to lookup the objects type tree, as rtti reflex).

Thank you and best regards.

Roberto

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: fpc debugger
« Reply #1 on: May 23, 2018, 11:57:36 am »
What exactly to you refer to by "the debugger of fpc"?

1) The debugger in the fp (textmode) ide (part of fpc)
2) The debugger in Lazarus

Depending on the answer I can move this topic to either of the following boards
Using the Lazarus IDE > Debugger
Fpc > textmode ide

Both of the debuggers are based on GDB (though Lazarus has also fpdebug, but that is still alpha).

Lazarus debugger has "Use Instance class" (in the property for each watch.
In case of "Sender: TObject" it will show you the data of the real class (e.g. TButton).

Lazarus also has "Debug Inspector" which shows you all the fields, and in which class each field is defined.

I don't have Delphi, so I can't compare.



guest59697

  • Guest
Re: fpc debugger
« Reply #2 on: May 23, 2018, 02:36:56 pm »
I'm using latest lazarus/fpc combo,

if I should ask kindly, where those debugger options can be set?
R.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: fpc debugger
« Reply #3 on: May 23, 2018, 04:40:17 pm »
I am not 100% sure what you are looking for (I do not have Delphi).

Though from long ago, I believe delphi has some structured/treeview-like view for watches? This we do not have. There are no immediate plans for it. Though if we have the time, or patches are provided then it would be done...

There are several ways to view values
All available via
- the editors pop-up menu (section debug)
- The main menu, either "View">"Debug Windows", or "Run"
- keystrokes
- context menu of the watches window

Watch list: http://wiki.lazarus.freepascal.org/IDE_Window:_Watch_list
1) hit the properties button (or context menu), and select "Use instance class".
"Sender: TObject" will display all the fields of the actual class
2) The wiki is outdated, but there is another tool button "magnifier", which will open a side bar. The current selected watch will be shown with better formatting.


http://wiki.lazarus.freepascal.org/IDE_Window:_Variable_Inspector
This allows you to explore nested classes. If your look at your Form1, and it has a field FButton1, then you can doubleclick the FButton1.

http://wiki.lazarus.freepascal.org/IDE_Window:_Evaluate/Modify
More space for the result, but only one at a time

guest59697

  • Guest
Re: fpc debugger
« Reply #4 on: May 23, 2018, 05:11:11 pm »
ok,

does exists a plugin to have the "intellisense" working and showing, unroll methods, fields and childs?
:-\

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: fpc debugger
« Reply #5 on: May 23, 2018, 05:42:04 pm »
"intellisense" is not debugging, is it?

In Lazarus it is called code completion.

The drop down opens if you press ctrl-space.

It also opens after you typed a dot "." like "Form1." (but in this case only after a short delay.  The delay can be set in menu Tools > options: Editor > Completion and hints.

If you miss features to write and edit code, you may want to check this page http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools

If you want to see some of the stuff Lazarus has: http://wiki.lazarus.freepascal.org/New_IDE_features_since

 

TinyPortal © 2005-2018