Sublime Text 2 - No console output

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Kovaz
Prole
Posts: 2
Joined: Sat Jul 04, 2015 9:32 pm

Sublime Text 2 - No console output

Post by Kovaz »

I've been trying to get Sublime Text 2's build systems to work for me, but I can't get the console to show any output. The game runs correctly but no console. If I run my game manually by navigating to the directory and typing "love .", I get the output I'm looking for, so I'm certain it's a Sublime issue.

I found another thread with the same issue but there wasn't a solution found and I'm out of ideas. I'm using LOVE 0.9.2 and Sublime Text 2.0.2. I've tried "io.stdout:setvbuf("no")" but that didn't change anything. The funny part is, if I run a different command (for example echo) I get the correct output in Sublime, and if I put some gibberish command the right error message shows. It's only when I run LOVE that there's no output. Here's my sublime project:

Code: Select all

{
	"folders":
	[
		{
			"path": "."
		}
	],
	"build_systems":
	[
		{
			"name": "sandbox:run",
			"cmd": ["love", "$project_path"],
			"shell": true
		}
	]
}
and conf.lua:

Code: Select all

-- Configuration

-- Make console output appear in sublime text (Doesn't appear to work)
io.stdout:setvbuf("no")


function love.conf(t)
	t.title = "Hello World"
	t.version = "0.9.2"
	t.window.width = 1280
	t.window.height = 1024
	t.window.display = 1

	-- For Debugging
	t.console = true
end
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Sublime Text 2 - No console output

Post by Nixola »

Try setting t.console to false, or not setting it at all
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Kovaz
Prole
Posts: 2
Joined: Sat Jul 04, 2015 9:32 pm

Re: Sublime Text 2 - No console output

Post by Kovaz »

Nixola wrote:Try setting t.console to false, or not setting it at all
Not setting it worked! Thank you!

Actually, now that I test it some more:

Setting it to false and not setting both act the same: I get console output in Sublime, but no console output if I run it from the command line. If I set it to true, I get console output when I run it via command line, but nothing in Sublime. I'd ideally like both, but I guess this works for now. Thanks again!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests