Recent

Author Topic: FpDebug 1.0  (Read 17615 times)

Zaher

  • Hero Member
  • *****
  • Posts: 640
    • parmaja.org
Re: FpDebug 1.0
« Reply #15 on: July 08, 2021, 01:37:46 pm »
Yes I meant my open source editor I wrote it, and there is another editors used Lazarus,
but mine I am working on it, have PHP debugger,  with abstract class for Step by Step in source code, and watch hint etc, and I want to add gdb debugger support.

https://github.com/parmaja/miniedit

and thank you for your efforts :)
« Last Edit: July 08, 2021, 01:48:24 pm by Zaher »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug 1.0
« Reply #16 on: July 08, 2021, 02:23:53 pm »
Well if you integrate the DebuggerInf then you can use any of the debuggers in the IDE.

If you do, and you have comments on the DebuggerInf and how to improve it => welcome.

---
package LazDebuggerFp does this in the IDE.
Also give you an idea how to do stepping.
(Note that there is very strict which thread may access what data)


Some parts (like handling seh exception) should move to FpDebug eventually.

--------------
FpDebug is also used by Joost's debug server https://gitlab.freepascal.org/Joost/fpdserver
that implement DAB
« Last Edit: July 08, 2021, 02:26:51 pm by Martin_fr »

d7_2_laz

  • Full Member
  • ***
  • Posts: 197
Re: FpDebug 1.0
« Reply #17 on: July 14, 2021, 01:23:49 pm »
Small question: i noticed that with 2.2 RC1 "OutputDebugString" does no longer generates output for the event window ("Ereignis-Protokoll"). // OS Windows
I use it oftenly as a little helper for to trace something temporarely, without needing then additional includes (except unit Windows) or logging frameworks.
Is that by intention or can i reactivate a usage of OutputDebugString by a setting?
Debugger info type is still set as before (Dwarf2).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug 1.0
« Reply #18 on: July 16, 2021, 06:59:45 pm »
Small question: i noticed that with 2.2 RC1 "OutputDebugString" does no longer generates output for the event window ("Ereignis-Protokoll"). // OS Windows
I use it oftenly as a little helper for to trace something temporarely, without needing then additional includes (except unit Windows) or logging frameworks.
Is that by intention or can i reactivate a usage of OutputDebugString by a setting?
Debugger info type is still set as before (Dwarf2).
If you use FpDebug, that is probably not implemented.
You can switch to gdb. (global or per project)

If you did use gdb, then that may be because it's a different gdb version.
You can install other gdb...


-------------
I never used the command.

Btw there is a package lazDebugServer. No idea if related.

d7_2_laz

  • Full Member
  • ***
  • Posts: 197
Re: FpDebug 1.0
« Reply #19 on: July 16, 2021, 08:41:31 pm »
Hm, i'm compiling for the Windows platform, but never did choose intentionally which kind of debugger i use  - i was happy with the default.
When recompiling the project with 2.2 RC1, as of the Release Notes the debugger default did change:
Quote
LazDebugger-FP (FpDebug) v1.0 is now the default for new installations on Windows and Linux.
So i did assume the change was due to this switch of the defaul to FpDebug.
Seen for itself i've no specific reason to switch to another debugger.

Nicola Gorlandi

  • Jr. Member
  • **
  • Posts: 85
Re: FpDebug 1.0
« Reply #20 on: July 17, 2021, 06:22:27 am »
Does Fpdebug show variant value? I means in case I have a Variant variabile can I check its values ?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug 1.0
« Reply #21 on: July 17, 2021, 10:51:17 am »
Does Fpdebug show variant value? I means in case I have a Variant variabile can I check its values ?
Ah, good question. Something I had not even thought of at all...

Tested => no.
But from an quick glance, the data may be in the debug info. Then it should be possible.

Please file a feature request on mantis, so it wont be forgotten.

----------------
That is why testers are needed.
I can't possible think of every use case myself....

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug 1.0
« Reply #22 on: July 17, 2021, 12:15:14 pm »
Actually, dwarf 2 shows it as a record.

Only dwarf 3 does not.

Nicola Gorlandi

  • Jr. Member
  • **
  • Posts: 85
Re: FpDebug 1.0
« Reply #23 on: July 17, 2021, 12:31:06 pm »

prof7bit

  • Jr. Member
  • **
  • Posts: 85
Re: FpDebug 1.0
« Reply #24 on: August 22, 2021, 11:45:45 am »
How do I use it?

I only have gdb, gdb through ssh, gdbserver and LLDB in the dropdown list.

Lazarus 2.2.0RC2 rfixes_2_2-0-gc60b5f9a7e FPC 3.2.3 x86_64-linux-qt5

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1592
  • Former Delphi 1-7, 10.2 user
Re: FpDebug 1.0
« Reply #25 on: August 22, 2021, 11:51:59 am »
There should be an "LLDB debugger (with fpdebug) (Beta)" option.

If not, from the main IDE screen, click Packages->Install/UninstallPackages. Shown is two lists of packages, the list on the left is installed, the list on the right is available to install. Look for LazDebuggerFpLldb (exactly that, there are some similar named but less suitable packages). If it is on the right hand side, click it, press "Install Selection" and then "Save and rebuild IDE". This will take a little time, the IDE will shutdown and restart and all should be well.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

prof7bit

  • Jr. Member
  • **
  • Posts: 85
Re: FpDebug 1.0
« Reply #26 on: August 22, 2021, 12:05:00 pm »
Ok, I installed the missing LazDebuggerFpLldb and now I can select "LLDB debugger (with fpdebug) (Beta)".

But is is still missing something:

When seting a breakpoint it complains

"Es ist kein Debugger angegeben.
Das Setzen von Haltepunkten ist wirkungslos solange nicht im Debugger-Einstellungsdialog im Menü ein Debugger festgelegt ist."

(Translated: There is no debugger selected. Can't set breakpoints if there is no debugger selecte in the debugger settings dialog")

Then I enter this dialog again and the only binary I can select is gdb. If I select gdb it will complain during debugging that it expected someting else.

prof7bit

  • Jr. Member
  • **
  • Posts: 85
Re: FpDebug 1.0
« Reply #27 on: August 22, 2021, 12:15:03 pm »
I built my Lazarus with fpcupdeluxe, is it possible that fpcupdeluxe "forgot" to build the debugger binary?

Should this have happened automatically or should I file an issue with the fpcupdeluxe project once LongDirtyAnimAlf is back from his 2 weeks mountain climbing vacation?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1592
  • Former Delphi 1-7, 10.2 user
Re: FpDebug 1.0
« Reply #28 on: August 22, 2021, 12:19:46 pm »
Lazarus 2.2 RC1 contains Martin's new "FPdebug internal Dwarf-debugger" which requires no additional binaries.

Older Lazarus versions allow the installation of LazDebuggerFpLldb which needs the lldb debugger binary to be installed (as it is, eg, natively on macOS). You will need to install lldb if you wish to use it instead of gdb or install Lazarus 2.2. RC1.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7415
  • Debugger - SynEdit - and more
    • wiki
Re: FpDebug 1.0
« Reply #29 on: August 22, 2021, 01:50:56 pm »
How do I use it?

I only have gdb, gdb through ssh, gdbserver and LLDB in the dropdown list.

Lazarus 2.2.0RC2 rfixes_2_2-0-gc60b5f9a7e FPC 3.2.3 x86_64-linux-qt5
If you build from sources, with your existing config, you may have to install the package yourself. Package: LazDebuggerFp

 

TinyPortal © 2005-2018