Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-07

How to enable the "Terminal Output" window

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

I have two copies of Lazarus - one on my host system, and one in a VM. The VM version as a "Terminal Output" option in the View -> Debug Windows menu. But my Lazarus on my host system doesn't have that option. My host system is running Lazarus 1.5 r49482 FPC 2.6.4 x86_64-freebsd-gtk 2

Is there an add-on package I need to install to enable this feature?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin Frb
to Graeme Geldenhuys
Graeme Geldenhuys wrote 10 lines
I have two copies of Lazarus - one on my host system, and one in a VM. The VM version as a "Terminal Output" option in the View -> Debug Windows menu. But my Lazarus on my host system doesn't have that option. My host system is running Lazarus 1.5 r49482 FPC 2.6.4 x86_64-freebsd-gtk 2 Is there an add-on package I need to install to enable this feature? Regards, - Graeme -

It may just be a define... Or it may not be implemented.

On Windows "Terminal Output" does not exist, because console apps always have there own window (though if someone knew how to implement it ...) On MAC, no one seems to know how to do a virtual pty, so it is not implemented.

Freebsd was never tested. If the linux code for a virtual pty works, then only the IFDEF needs to be changed.

search for
{$IFDEF linux} {$DEFINE DBG_ENABLE_TERMINAL} {$ENDIF}

and enable it, and see if it works.

Reply by email

Mehmet Erol Sanliturk
to Martin Frb
Martin Frb wrote 36 lines
On 22/07/2015 09:52, Graeme Geldenhuys wrote: > I have two copies of Lazarus - one on my host system, and one in a VM. > The VM version as a "Terminal Output" option in the View -> Debug > Windows menu. But my Lazarus on my host system doesn't have that option. > My host system is running Lazarus 1.5 r49482 FPC 2.6.4 x86_64-freebsd-gtk > 2 > > Is there an add-on package I need to install to enable this feature? > > Regards, > - Graeme - > > It may just be a define... Or it may not be implemented. On Windows "Terminal Output" does not exist, because console apps always have there own window (though if someone knew how to implement it ...) On MAC, no one seems to know how to do a virtual pty, so it is not implemented. Freebsd was never tested. If the linux code for a virtual pty works, then only the IFDEF needs to be changed. search for {$IFDEF linux} {$DEFINE DBG_ENABLE_TERMINAL} {$ENDIF} and enable it, and see if it works. -- _______________________________________________

Open a terminal .
Start Lazarus from that terminal .
Any output to terminal will be seen in the opened terminal .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150722/6f97c44c/attachment.html>

Reply by email

Graeme Geldenhuys
to Martin Frb: It may just be a define... Or it may not be implemented. On Windows "Terminal Output"…
Martin Frb wrote
Freebsd was never tested. If the linux code for a virtual pty works, then only the IFDEF needs to be changed.

Ah, my host is indeed FreeBSD. I had a quick look and it doesn't compile. The minilibc unit causes problems with getpt (linux) vs posix_openpt() (freeBSD), or ptsname_r() vs ptsname() etc.

I'll take a further look when I have some more time.

Thanks for the info though.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin Frb
to Graeme Geldenhuys
Graeme Geldenhuys wrote 14 lines
On 2015-07-22 10:26, Martin Frb wrote: > Freebsd was never tested. If the linux code for a virtual pty works, > then only the IFDEF needs to be changed. Ah, my host is indeed FreeBSD. I had a quick look and it doesn't compile. The minilibc unit causes problems with getpt (linux) vs posix_openpt() (freeBSD), or ptsname_r() vs ptsname() etc. I'll take a further look when I have some more time. Thanks for the info though. Regards, - Graeme -

you can always redirect to any existing terminal.

Open a terminal (and if you wan, run something (a loop) that prevents the shell from reading your keyboard)

get the pty number/dev.

It Tools / Options / debugger, in the property grid, find: "ConsoleTty" (it is {$IFDEF UNIX}, so you should have it)
Enter the pty in that field. (the IDE will tell gdb to do the redirect, so if your gdb behaves....)

downside, each time you open a new terminal, you need to change this.

Reply by email