Console App Pausing the Output Screen

Hi,

I have a console application that works how i like it. however, i made some tweaks to it and now it will not finish running. i can watch it run and then when it hits an error in the code it will flash an error message really fast, faster then i can read it. is there a way that i can either print this error to a file? Or simply pause the Command Screen so i can read it? I have narrowed it down to where in my code the error is coming from but i just need to see this error message to see why its not completing the process.

[quote=193103:@James Rogers]Hi,

I have a console application that works how i like it. however, i made some tweaks to it and now it will not finish running. i can watch it run and then when it hits an error in the code it will flash an error message really fast, faster then i can read it. is there a way that i can either print this error to a file? Or simply pause the Command Screen so i can read it? I have narrowed it down to where in my code the error is coming from but i just need to see this error message to see why its not completing the process.[/quote]

You can send a message to the Console on Mac with

System.DebugLog("message")

http://documentation.xojo.com/index.php/System.DebugLog

On PC you can obtain the same as Console with DebugView see

Very useful to debug, and to send all sorts of messages such as error messages. Since we are talking about console applications, the mention of the Console utility is kind of confusing. It resides in the Utilities folder, within the Applications folder, and lists all sorts of system things in a continuous log. So does DebugView on Windows.

In a Console App you can also use:

Print "Hello, world."

This will print the message to the console window/messages pane(In the IDE).

[quote=193167:@Albin Kiland]In a Console App you can also use:

Print "Hello, world."

This will print the message to the console window/messages pane(In the IDE).[/quote]

Only in Run mode, right ?

Should work on built apps if I’m not mistaken.
Works on we stand alone witch is almost the same :slight_smile:

[quote=193201:@Albin Kiland]Should work on built apps if I’m not mistaken.
Works on we stand alone witch is almost the same :)[/quote]

Albin, there must be something I do not get.

On Mac, both Print and Debuglog in the Run event of a Console app appear only in the Terminal. Not in the Message Pane under the IDE code. Only System.DebugLog appear in the Console utility.

In Windows, I had to get DebugView because of a bug that prevents debuglog to work properly, the message pane never showing anything for Web apps beyond “application launched” and “application has ended”.

I just tried print "whatever" and system.debuglog "whatever" in the Run event of a Console app

None of that shows in the message pane of the IDE.

Only System.Debuglog shows in DebugView.

Same thing run in the IDE or built, then run.

Sorry. In a Console app, Print() does indeed not show in the messages pane. Sorry about that.
It does show in the messages pane in a WE app though. Thought it was the same.

[quote=193226:@Albin Kiland]Sorry. In a Console app, Print() does indeed not show in the messages pane. Sorry about that.
It does show in the messages pane in a WE app though. Thought it was the same.[/quote]

Now, that is interesting since debuglog is broken in Windows for Web, and Print works. Good to know. Thank you :slight_smile: