Forum > Linux

Simple Project output - where's da console?

(1/3) > >>

decuser:
I have a simple project:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program EatAtJoes; USES Crt; begin  ClrScr;  GotoXY(10,5);  Writeln('Eat at Joe''s!');  GotoXY(10,7);  Writeln('Ten Million Flies Can''t ALL be wrong!');  Readln;end.     

I click run and nothing shows up. After a google search, I see stuff about adding Readln to get it to wait for input. Since I already have it, I'm stumped until I locate the View->Debug Windows->Console In/Output. So, I run that and it pops up with a very nice window that shows something called 'Raw Output' It doesn't look that raw... [6n[H[m[H[2J[5;10HEat at Joe's! looks to me like some control characters and my string. I don't mind, but none of the options gets to what I'd like, which is just my strings showing as what I would get with any terminal app.

So, my questions are:

1. Is it possible to get the output to go to a terminal window provided by the OS (I'm on MX-Linux 23-2 "Libretto" and I have konsole, xterm, and gnome-console available?
2. Is it possible to get it to not show the control characters?
3. Are the control characters coming from the USES Crt thing combining with Writeln?

I'm using debian bookworm's main packages - fpc 3.2.2+dfsg-20 and lazarus 2.2.6+dfsg2-2...

Thanks,

Will

Martin_fr:
At the moment there is no convenient way to output to a terminal....

There may be 2 ways, but I have tested neither, and they are well... workarounds

1) Use the "gdb server" debugger. Then you can open a shell of your choice, and run your app under gdbserver. You must start that by hand, the IDE will not do it for you. gdb server will pause your project, the IDE can connect to it, and you can debug.

2) using the gdb debugger, in the settings for the gdb debugger is a property grid. It has some setting for a "pty" (I don't have my Linux running now, so not sure of the exact details).
If you have a terminal open, and print that terminals pty, then you can enter it here, and your app will connect to it. But if you do input, it will be shared with the shell....


So neither of those 2 is really good.

On Mac the LLDB debugger can open a terminal, not sure if it can on Linux.

EDIT: the internal tty may even exist for fpdebug (not sure, currently on Windows)

decuser:
Well, it's not the end of the world. I'm only using it for simple pascal anyway. I can live with it and when I really want a terminal, I can just open one and run the app there. I appreciate the workarounds. I'll try them out as time and energy permit. I have confirmed that it's the same situation w/3.0.

cdbc:
Hi
I do it in one of two ways:
1) I have a konsole(or xterminal) window running on another 'desktop' and
    run my app there to test/see final result.
2) In 'View' -> 'Debug Windows' -> 'Console In/Output', there's an ide-window
    that opens and lets you debug / interact with console. Remember to click on
    it to get focus if you have a 'readln' or so...
    You probably get a lot of escape-codes, but it's doable to debug this way...
Regards Benny

new2thisagain395:
Is there some way to configure that window so it's a little more visually appealing and get rid of the escape codes?  As noted it is workable but it's certainly not great.

Navigation

[0] Message Index

[#] Next page

Go to full version