Debug - A whole new way of debugging your game
Posted: Wed Feb 09, 2011 4:55 pm
Tired of having to restart your whole game when an error occurs or attaching a console, which you have to switch to, just to see your debug printings? Tired of adding extra variable in text to your graphical experience, taking space and looks misplaced? Tired of not having the possibility to execute scripts in-game without attaching a GUI or even writing one yourself? Now all of this is unnecessary!
With the adding of only one script you can now access an in-game console using CTRL+F8 with many lovely features, including:
Note: Require the script outside all love core functions or it will not work.
Changelog
Version 1.1.5
With the adding of only one script you can now access an in-game console using CTRL+F8 with many lovely features, including:
- A scrollable list of the output
- Both errors and printings are sent to the output
- Only prints the same error once, useful for errors in love.update, can be toggled
- Semi-transparent console overlay
- CTRL/Shift + F8 toggle of the console
- Text input for executing lua snippets right in your console
- Graphic feedback telling about unseen lines
Note: Require the script outside all love core functions or it will not work.
Code: Select all
--Example
require("debug.lua")
function love.load()
end
Version 1.1.5
- Added Shift + F8 console opening, the old one still remains (Thank you miko)
- Everything except for settings (which has its own global table) is now put into the local table _Debug (Thank you tentus)
- Fixed the console to be hidden at the start
- Added _OverlayColor to global settings (see _Settings() for a list of settings) Changed location as of 1.1.5 to _DebugSettings.Settings()
- Initial version