Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » "realtime" console update?(how to see "prints" in realtime, not after end?)
"realtime" console update? [message #840808] Tue, 10 April 2012 14:33 Go to next message
annika Ryll is currently offline annika RyllFriend
Messages: 5
Registered: April 2012
Junior Member
At first i like to say that im really happy with Koneki, ty for your effort.

I use moai, and i run it with a run.bat file as external configuration.

The settings are:
location: {workspace_loc:/run.bat}
working directory: {workspace_loc:/}

This is working fine, and when i do print("bla") in lua, it prints me "bla" into the console.

But the worse thing is that it looks like the console is only updated after the lua programm ends.

When i start the run.bat manually from explorer then i can see the prints and error messages in "realtime", why is this not working in the console?

i hoped console is just anyhow replacing the cmd window or something
Re: "realtime" console update? [message #841603 is a reply to message #840808] Wed, 11 April 2012 14:29 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,

This is because the stdout buffer is not flushed on each print.
To fix that, without modification of your code, you should execute this line in your run.bat
io.stdout:setvbuf("line");

The full line should look like that :
lua -e "io.stdout:setvbuf('line'); require('debugger')();" MyApp.lua;

Hope this helps you Wink
Previous Topic:feature request: highlight globals
Next Topic:External Tools Configurations
Goto Forum:
  


Current Time: Thu Apr 25 12:03:36 GMT 2024

Powered by FUDForum. Page generated in 0.02554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top