Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » "realtime" console update?(how to see "prints" in realtime, not after end?)
"realtime" console update? [message #840808] Tue, 10 April 2012 10:33 Go to next message
annika Ryll is currently offline annika Ryll
Messages: 3
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 10:29 Go to previous message
Simon Bernard is currently offline Simon Bernard
Messages: 164
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: Fri Jul 25 14:18:09 EDT 2014

Powered by FUDForum. Page generated in 0.01466 seconds