Put this at the head of your main.lua
, or before a particularly important print.
io.stdout:setvbuf("no")
If you're using windows, love 0.9.2, and ZeroBrane Studio < 0.95 you might have issues doing the above.
- Ensure
t.console = true
isn't in yourconf.lua
. - Don't use
love._openConsole()
in your code.
You do not need this to get a console to open.
Make sure the beginning of your love.load()
looks like this:
love.load(arg)
if arg[#arg] == "-debug" then
-- if your game is invoked with "-debug" (zerobrane does this by default)
-- invoke the debugger
require("mobdebug").start()
end
-- ... your code here ...
end
If you ever need to delay your debugger or only invoke it at a given point, you can use:
local mobdebug = require("mobdebug")
mobdebug.start()
-- your code here
mobdebug.stop()
Use Ctrl+F6
to run your game in a way that allows you to modify variables on the fly. Might not work for complex games.