why doesn't it work?
put the debug.lua into a directory and created inside the same a main.lua.
the main.lua has "require 'debug'" and "function love.load() print('hello') end" inside.
cannot activate cant see anything. whats wrong?
Debug - A whole new way of debugging your game
Re: Debug - A whole new way of debugging your game
I've updated this myself for 0.8.0, most of the problems were in love.run.
Installation is mostly the same, except you can't name it debug.lua anymore. The code require "debug" doesn't seem to work anymore, it may be because it tries requiring the debug library. I've changed it to lovedebug.lua.
I've also added a new variable that you can set to customize this. Originally, you had to hold shift/control and press f8. It still defaults to f8, but now you can set _lovedebugpresskey to your "press key". Just something to make it more convenient.
Anyway, enjoy this new working version.
Installation is mostly the same, except you can't name it debug.lua anymore. The code require "debug" doesn't seem to work anymore, it may be because it tries requiring the debug library. I've changed it to lovedebug.lua.
I've also added a new variable that you can set to customize this. Originally, you had to hold shift/control and press f8. It still defaults to f8, but now you can set _lovedebugpresskey to your "press key". Just something to make it more convenient.
Anyway, enjoy this new working version.
- Attachments
-
- lovedebug.lua
- New for 0.8.0
- (12.23 KiB) Downloaded 242 times
Re: Debug - A whole new way of debugging your game
downloaded and tried, although I can't use it right now..
there are some errors appear, but looking into it.
would you mind uploading your .love project file, which is working for you?
there are some errors appear, but looking into it.
would you mind uploading your .love project file, which is working for you?
Blog herrsch.de
Re: Debug - A whole new way of debugging your game
I think I've fixed the errors you are talking about. For some reason left and right keys were returning unicode values of around 6000. They couldn't be translated by string.char, so I added a unicode limit of 500.
I also added some extra functionality to it, pressing tab will auto complete that variable to the current proposal. Also, pressing up restores your last command.
I've added the new file, and my game lovedebug is running in.
I also added some extra functionality to it, pressing tab will auto complete that variable to the current proposal. Also, pressing up restores your last command.
I've added the new file, and my game lovedebug is running in.
- Attachments
-
- lovedebug.lua
- Fixed some errors
- (12.78 KiB) Downloaded 239 times
Re: Debug - A whole new way of debugging your game
this is AWESOME. very useful!
PS: would be cool to have a repetitive keyboard behavior on pressed down keys. for example:
while love.keyboard.isDown("backspace") do
--delete command line
end
PS: would be cool to have a repetitive keyboard behavior on pressed down keys. for example:
while love.keyboard.isDown("backspace") do
--delete command line
end
Blog herrsch.de
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Debug - A whole new way of debugging your game
I picked up Qcode's code and added some of my own (I've been adding stuff to this since I downloaded it)
There was one thing that I hated about this, it was when I had a lot of output in the console and I had to scroll all the way down to see the end, I've even spent MINUTES just scrolling and scrolling down and that sucked so I've added a new functionality:
Let's make some changlogs for this:
Changelog
Version 1.2.2 (not official)
There was one thing that I hated about this, it was when I had a lot of output in the console and I had to scroll all the way down to see the end, I've even spent MINUTES just scrolling and scrolling down and that sucked so I've added a new functionality:
- You can now jump to the last output just by pressing the middle mouse button.
Let's make some changlogs for this:
Changelog
Version 1.2.2 (not official)
- Added a new functionality that enables you to jump right to the bottom of the console by pressing the middle mouse button.
- Fixed some bugs
- Added a new functionality that autocompletes the variable to the current proposal by pressing tab
- Converted to LÖVE 0.8.0
- Added a new functionality that enables you to change the 'f8' key to what you want by changing the _lovedebugpresskey='the key you want'
- 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
- Attachments
-
- lovedebug.lua
- Version 1.2.2 (not oficial)
You can now jump to the last output - (12.92 KiB) Downloaded 222 times
Re: Debug - A whole new way of debugging your game
Thanks for the unofficial update !
Here a little bug I found.
When I don't use a custom font, ex:
I get :
lovedebug.lua:175: Incorrect parameter type: expected userdata.
in function 'setFont'
I fixed it by replacing (line 175) :
love.graphics.setFont(font)
by :
if font then love.graphics.setFont(font) end
Here a little bug I found.
When I don't use a custom font, ex:
Code: Select all
require 'lovedebug'
function love.load()
end
function love.update(dt)
end
function love.draw()
end
lovedebug.lua:175: Incorrect parameter type: expected userdata.
in function 'setFont'
I fixed it by replacing (line 175) :
love.graphics.setFont(font)
by :
if font then love.graphics.setFont(font) end
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Debug - A whole new way of debugging your game
Alright cool, so apperantly when you don't use a costum font the debugger crashes and thanks to Walz. that has now been fixed
Let's make some changlogs for this:
Changelog
Version 1.2.3 (Not Official) by Walz.
Let's make some changlogs for this:
Changelog
Version 1.2.3 (Not Official) by Walz.
- Fixed a font related bug
- Added a new functionality that enables you to jump right to the bottom of the console by pressing the middle mouse button.
- Fixed some bugs
- Added a new functionality that autocompletes the variable to the current proposal by pressing tab
- Converted to LÖVE 0.8.0
- Added a new functionality that enables you to change the 'f8' key to what you want by changing the _lovedebugpresskey='the key you want'
- 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
- Attachments
-
- lovedebug.lua
- Version 1.2.3 (Not Official)
Fixed a bug - (12.94 KiB) Downloaded 219 times
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Debug - A whole new way of debugging your game
This is actually because the default font is only loaded upon first use, so getFont returns nil until after the first print (unless setFont is called manually, beforehand).
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Debug - A whole new way of debugging your game
Noted, so that's why checking the font before setting it fixed itbartbes wrote:This is actually because the default font is only loaded upon first use, so getFont returns nil until after the first print (unless setFont is called manually, beforehand).
Who is online
Users browsing this forum: No registered users and 6 guests