Dear friends,
I'd like to ask some questions about debugging habits you use when developing with Love. Sorry if I am misinformed, but I was not able to find any serious text about how to do this. The only thing I know is that stderr/stdout is redirected to dir where love.exe resides (on windows).
But how can I be able to set breakpoint, trace a program or view value of specific variable? Especially when there is no direct control of lua interpreter (i have access only to love.exe). Do you guys use some high level library for it (no I don't mean debug module in lua)?
I love Love , but without basic debugging tools, it is really pain to develop in it. I have project in development made with Love (its my bachelors thesis) and I dont want to switch the API .
Thanx for any response, friends.
Tomas Vymazal
Debugging with LOVE
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- MyOwnClone
- Prole
- Posts: 2
- Joined: Wed Oct 14, 2009 5:38 pm
- Location: czech republic
- Contact:
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Debugging with LOVE
The only debugging facility for LÖVE I ever use is this place (/me makes wide gesture with both arms): the LÖVE CLUB.
OK, I'm sorry, I don't have a real answer.
Good luck with your thesis, though.
OK, I'm sorry, I don't have a real answer.
Good luck with your thesis, though.
Help us help you: attach a .love.
Re: Debugging with LOVE
I'm on Ubuntu, so I don't know how it transfers but I always run my love games through a terminal. I use the print method somewhere in my code and it writes the info to the terminal.
Code: Select all
a = "example"
print(a)
Re: Debugging with LOVE
There are several ways to debugging lua you can:
1) Find an IDE that supports remote debugging with lua. I never really explored this option much, but I think the problem with this is (at least the ones I've seen) requires you to integrate their lib to the lua application or it requires debug data files generated when you build the lua application.
2) The one I'm currently using right now: Decoda. This allows you to have breakpoints, stack trace, and watchers. The only catch is that it requires the .pdb file that is generated when you compile the lua application (I think only visual studio creates that file). It was definitely worth it for me and the love project has the solution/project files for you to directly build.
3) Use lua's built in debug api. There's a lot of info on this in Programming In Lua book or the Lua Reference Manual.
1) Find an IDE that supports remote debugging with lua. I never really explored this option much, but I think the problem with this is (at least the ones I've seen) requires you to integrate their lib to the lua application or it requires debug data files generated when you build the lua application.
2) The one I'm currently using right now: Decoda. This allows you to have breakpoints, stack trace, and watchers. The only catch is that it requires the .pdb file that is generated when you compile the lua application (I think only visual studio creates that file). It was definitely worth it for me and the love project has the solution/project files for you to directly build.
3) Use lua's built in debug api. There's a lot of info on this in Programming In Lua book or the Lua Reference Manual.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Debugging with LOVE
For LovelyBigPlanet I have a console integrated and I use that for debugging too.
- MyOwnClone
- Prole
- Posts: 2
- Joined: Wed Oct 14, 2009 5:38 pm
- Location: czech republic
- Contact:
Re: Debugging with LOVE
Bartbes: thanx, but yesterday I started writing my own debugging console. Now I have console in/out, print redirection to console, printing values of specified variables or tables. I am planning to implements watches and breakpoints (via sethook - hoping to get it done). Anyway, I will give that debug console to community for free use...
Re: Debugging with LOVE
Hey, could someone explain how to use LOVE with Decoda? I've spent ages researching debugging techniques and I want to use Decoda but when I try to debug some code it comes up with the project settings window where on the tutorial video it says you have input the executable of the project. Now is there a way to create an executable for your game because love.exe just opens that tank demo. I thought about creating a shortcut icon of love.exe and adding my game to the target so I would have an icon to run my game, but I can't see any documentation on how to do that so is it not possible? The tutorial mentions where to add a .pdb file but if this is the only way can someone explain how you generate it. As far as I can tell you can't compile lua in Visual Studio but if it is possible to compile and debug in VS then that would be an option for me.Igmon wrote:2) The one I'm currently using right now: Decoda. This allows you to have breakpoints, stack trace, and watchers. The only catch is that it requires the .pdb file that is generated when you compile the lua application (I think only visual studio creates that file). It was definitely worth it for me and the love project has the solution/project files for you to directly build.
Thank you.
Re: Debugging with LOVE
Ok worked out you can create a shortcut icon to a game by putting this in target: (root)\LOVE\love.exe (root)\LOVE\(game)
But probably should have realised putting the shortcut in Decoda still just opens love.exe as it is only a shortcut
But probably should have realised putting the shortcut in Decoda still just opens love.exe as it is only a shortcut
Re: Debugging with LOVE
Ok I've created an executable by following the distribution article on the wiki and set that to the .exe Decoda uses. However this means every time I have a problem I have to repackage the game and set the new .exe in Decoda. But at least it's something.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests