Recent

Author Topic: 2.2 RC1 Windows, with GDB is there an option to reanimate OutputDebugString?  (Read 5487 times)

d7_2_laz

  • Full Member
  • ***
  • Posts: 202
Wirh 2.2 RC1 / Windows x64 / i'm missing the "OutputDebugString" funmctionality as a small and handy means for to write some infos to the event log without needing to have additinal includes or further steps to go.
Remark: it's not in the FpDebug yet, but maybe still when using gdb.

I was told by avra that it could be reactivated by debugger setting via:
Lazarus / Tools / Options / Debugger / EventLog / Messages" configuration dialogue, Debug Output window, or something else?
I set the Debugger backend to gdb, and this is assumingly the translated equicalent:
Lazarus Menu item "Werkzeuge" (Tools) > Einstellungen (Options" > Debugger > "Ereignisprotokoll" (Event log).

Code: Pascal  [Select][+][-]
  1. EventLog / Messages you check Output checkbox, OutputDebugString('<<<<< It works ! >>>>>') outputs to Debug Output window

Cannot see anything about OutputDebugstring here, see screenshot attached.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7529
  • Debugger - SynEdit - and more
    • wiki
It is: "Ausgabe"

It has been added to fpdebug after the rc1. (at least on 64bit win / 32 bit awaits testing).

It did not work for gdb for me now. Gdb seems fine.
Please report as a bug on mantis

d7_2_laz

  • Full Member
  • ***
  • Posts: 202
Martin, if it would work with gdb, then i would have used that temporarely.
if - apparently - not, but added to FpDebug after the rc1, that's fine anyhow though, so i*ll wait for that.
- Clarified

Besides that: upto 2.0.12 the default was gdb i think (i ever used the default).
I can say definitely that it had worked here / Windows x64  ("worked" does mean: it really generated output for the event log).
You really still suggest to report it as a bug in mantis (gdb related)? Then i could do that.
Thank you!

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7529
  • Debugger - SynEdit - and more
    • wiki
Yes report a bug.

It should still work with gdb (and the new gdb.exe seems to report it, so it's the IDE)

avra

  • Hero Member
  • *****
  • Posts: 2262
    • Additional info
It is: "Ausgabe"
Yes, that is "Output" in English IDE version. Now all you need is to include Windows unit and use "OutputDebugString('<<<<< It works ! >>>>>')" command in code. If you do not see "Debug Output" window then go to "Lazarus / View / IDE Internals / Debug Output".
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7529
  • Debugger - SynEdit - and more
    • wiki
If you do not see "Debug Output" window then go to "Lazarus / View / IDE Internals / Debug Output".
Ah, but it should be in "event log" window.

"Debug Output" is low level internal.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7529
  • Debugger - SynEdit - and more
    • wiki
Fixed in trunk and fixes branch

avra

  • Hero Member
  • *****
  • Posts: 2262
    • Additional info
Fixed in trunk and fixes branch
Even better. Thanks!
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

d7_2_laz

  • Full Member
  • ***
  • Posts: 202
@Martin_fr. here's the suggested bug report against ..
https://bugs.freepascal.org/view.php?id=39278

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7529
  • Debugger - SynEdit - and more
    • wiki
@Martin_fr. here's the suggested bug report against ..
https://bugs.freepascal.org/view.php?id=39278
That overlapped. Though I hadn't been clear either.

I hadn't been sure when I will fix it. And if it had been later, then the report makes sure it is not forgotten.

Since I did fix it in the meantime, the need for the report was gone.

Though, as I said, I hadn't been clear.
Sometimes a report should be done even if the fix is already there. In complicated cases, the report might serve as an explanation why something was changed (if one later looks at the commit, and needs to find out why).

Anyway, no harm.

 

TinyPortal © 2005-2018