Hello everyone!
I would like to know what debugging tools you find useful when creating LÖVE games. These can be either specific to LÖVE or more general-purpose tools designed for Lua. I am doing the majority of my work on a Linux box, so I would prefer tools that work well in that environment; however, other people I am working with are using Windows and OSX. So recommendations for debugging tools for any system would be much appreciated. Or if you know of no utilities to suggest, then I would love to hear what your preferred approach is to debugging a LÖVE project.
Thanks in advanced.
Debugging Tools and Tips
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Debugging Tools and Tips
I'm not using any special debugging tools, the “blue error screen” gives enough information to find and correct all syntax errors and some typos and misplaced variables...
there is also a very useful “love.graphics.print()" that may be used do dump variables into the screen (just don't forget co convert everything to string - “tostring()” before displaying it)
there is also a very useful “love.graphics.print()" that may be used do dump variables into the screen (just don't forget co convert everything to string - “tostring()” before displaying it)
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Debugging Tools and Tips
Actually, I'm not using any debugging tool. I second Wojak, the blue screen is enough, to me.
But I can conceive that sometimes, one concern might be about optimizing and performance issues.
So here you are:
But I can conceive that sometimes, one concern might be about optimizing and performance issues.
So here you are:
- you might be interested in profilers (see LuaProfiler, ProFi.lua, Peperfish Profiler) that can be very useful for checking what parts of a code should be optimized.
- You might also want to look at memoizing. Kikito's Library for memoizing should also interest you.
- This thread about Lua Performance tips and tricks should also be interesting.
- And pay attention to headchant's library, LICK.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Debugging Tools and Tips
I am not a fan of cornflower blue. It distracts me from the terminal, and disorients me.
Here is a quick module for larger projects I wrote called fcblib.lua:
Here is a quick module for larger projects I wrote called fcblib.lua:
Code: Select all
--[[
_______________________
< Fuck Cornflower Blue! >
-----------------------
\ . .
\ / `. .' "
\ .---. < > < > .---.
\ | \ \ - ~ ~ - / / |
_____ ..-~ ~-..-~
| | \~~~\.' `./~~~/
--------- \__/ \__/
.' O \ / / \ "
(_____, `._.' | } \/~~~/
`----. / } | / \__/
`-. | / | / `. ,~~|
~-.__| /_ - ~ ^| /- _ `..-'
| / | / ~-. `-. _ _ _
|_____| |_____| ~ - . _ _ _ _ _>
--]]
function love.errhand(msg)
print(debug.traceback())
print(msg)
end
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Debugging Tools and Tips
I usually debug via print.
In a couple occasions where I needed to debug complex table layouts, I've used my own lib, inspect.lua, to do just that. I can't link to it, typing from mobile phone
In a couple occasions where I needed to debug complex table layouts, I've used my own lib, inspect.lua, to do just that. I can't link to it, typing from mobile phone
When I write def I mean function.
Re: Debugging Tools and Tips
Here it is
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Debugging Tools and Tips
I think somebody snuck a little into your avatar when you weren't looking.josefnpat wrote:I am not a fan of cornflower blue.
I had no idea love.errhand was a thing. I usually just alter love.run and pcall all of the callbacks.
Re: Debugging Tools and Tips
The lua-users wiki has a section about debugging Lua code. I've used RLdb, but the interface is very clunky, especially when compared with something like GDB. Believe it or not, using print() in clever places is probably the best option at the moment
Re: Debugging Tools and Tips
I think that using a debugger and placing asserts and breakpoints is preferable to peppering code with prints. The recent thread on IDEs mentions a couple of IDEs, like the "Lua Development Tools" eclipse plugin, that that can be used.vrld wrote:... using print() in clever places is probably the best option at the moment
Re: Debugging Tools and Tips
Of course it is. RLdb does a relatively decent job, but the interface is just ... subpar.kclanc wrote:I think that using a debugger and placing asserts and breakpoints is preferable to peppering code with prints.
But that forces you to use Eclipse. Now you have two problems.kclanc wrote:the "Lua Development Tools" eclipse plugin [...] can be used.
Who is online
Users browsing this forum: Bing [Bot] and 87 guests