Ace shinigami
Ace shinigami

Reputation: 1484

Writing a Debugger Love2d

I wanted to write a debugger for my Love2d game, but I can't print() to the command line. When I try to use print() nothing appears in the command line.

Upvotes: 1

Views: 617

Answers (3)

Wolf City
Wolf City

Reputation: 1

You can also use "lovec ." instead of "love ." and it will make the print statements show in the console.

Upvotes: 0

Alchemist
Alchemist

Reputation: 103

On the command line:

love folder-that-contains-main.lua --console

It's a special command line flag that will attach a console to your game window and display print() commands.

Upvotes: 2

Ulydev
Ulydev

Reputation: 343

This might happen on some computers if you have console buffering turned on (by default). You can call this at the beginning of your main.lua and see if it helps:

io.stdout:setvbuf('no')

Upvotes: 0

Related Questions