Recent

Author Topic: Please enable Console In/Output under Debug Windows on all of Unices  (Read 3172 times)

guest65109

  • Guest
I observed that only Lazarus for Linux has this option to show Console In/Output. Not only Linux, but other Unices also suffered the same problem. I know I could run the command line program with a host program, the fact is I always replace xterm with lxterminal for a better looking terminal emulator than xterm. But this is time consuming. Just Ctrl + Alt + O and we could open the Console In/Output window. I think the code for this feature is already cross platform. Please enable it for all of the Unices. Thanks.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #1 on: January 06, 2020, 04:54:20 pm »
/Which/ other unix implementations do you want it for? Have you tried making sure it's enabled in the relevant makefiles?

I did some work on that about a year ago to add the various output formats etc., I suspect Martin has done some since. A fairly major issue is the requirement for UTF-8 text to be collected from the debugger reliably.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #2 on: January 06, 2020, 05:50:56 pm »
The build in terminal window, requires that the IDE creates a virtual pty.
The implementation for this is currently only tested under linux.

If it works on other *nix, then the relevant ifdef can be extended.

You can try to compile the IDE with -dDBG_ENABLE_TERMINAL
But it may not compile, and if it compiles it may not work.

Also I have never checked if all relevant ifdef check DBG_ENABLE_TERMINAL, or if some check "ifdef linux" directly.....

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #3 on: January 06, 2020, 06:01:51 pm »
Historically I've tested Lazarus on SPARC/Solaris, but I'm pretty sure I've not tried the console output window. I can't currently do that since Solaris appeared to have a clandestine logic bomb which caused it to stop working after a year, I think that one or two users have it on AMD64 and if they're reading this I think they'd be doing the project a big favour if they could check what currently works.

@mrcoll: an alternative to the console output window is to start the program normally then attach to it using  Run -> Attach to program...  which allows you to use the IDE to debug a program which is interacting with a normal xterm etc. window.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9793
  • Debugger - SynEdit - and more
    • wiki
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #4 on: January 06, 2020, 06:17:04 pm »
There are various tricks. But they all need extra work....
https://wiki.lazarus.freepascal.org/Debugger_Console_App#gdbserver

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #5 on: January 07, 2020, 05:33:56 pm »
If it is required to open a tty, I think the code is not portable to other Unices. BTW, it's just my thought, it's not needed to be the truth.

He said pty, not tty. https://lwn.net/Articles/688809/

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

guest65109

  • Guest
Re: Please enable Console In/Output under Debug Windows on all of Unices
« Reply #6 on: January 07, 2020, 05:45:49 pm »
If it is required to open a tty, I think the code is not portable to other Unices. BTW, it's just my thought, it's not needed to be the truth.

He said pty, not tty. https://lwn.net/Articles/688809/

MarkMLl

Sorry. I misread his post. I deleted this post.

 

TinyPortal © 2005-2018