Debug with Lua, LOVE, VS Code

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Nekyia
Prole
Posts: 8
Joined: Thu Aug 03, 2017 4:25 pm

Debug with Lua, LOVE, VS Code

Post by Nekyia » Tue Sep 08, 2020 4:08 pm

Hello! :awesome:

I would like to know how you approach debbuging with LOVE ?
I am using VS Code with the plugin 'tomblind.local-lua-debugger-vscode'. I started briefly with ZeroBrane Studio and the debugger worked very well, but was much more happy with vs code.
I would like to uninstall zbs, but still use it occasionaly for the Local Console. My problem with vs code is that often the debugger doesn't seem to work. For example I would set a breakpoint and the debugging will ignore it. Or it refuses to display the variable names.
I end up using a lot of print() and feel like I am wasting a lot of time on debug.

Also how do you debug graphically? Do you add lines in the middle of the code? Write functions, that you may removed later?

In many game you can open a console and show stuff and control parameters with cvars. I am aware of the LoveDebug library, but my skills are limited and I would rather do some games before coding a console system tailor-made.

Sometimes I run the debuger and find the problem immediatly, but mostly it is just print()
I feel inefficient and it is very frustrating.

I am curious about how more experienced and smarter people do it?

User avatar
D0NM
Party member
Posts: 245
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: Debug with Lua, LOVE, VS Code

Post by D0NM » Mon Sep 28, 2020 10:22 am

Just putting this old topic of yours here
https://love2d.org/forums/viewtopic.php ... 0&p=234856

I remember running Love2D with VSC...
but the break point used to work once. I wasn't able to continue debugging. So I dropped the idea of debugging Love2D with VSC.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

sphyrth
Party member
Posts: 258
Joined: Mon Jul 07, 2014 11:04 am
Contact:

Re: Debug with Lua, LOVE, VS Code

Post by sphyrth » Tue Sep 29, 2020 2:13 am

I don't have a Rubber Duck with me, so I use that Inefficient Style you mentioned.

Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests