This application attempts to patch Love2D/Löve game executables to inject Local Lua Debugger (lldebugger) initialization code into main.lua, enabling VS Code debugging of the Lua game code.
- Build the project using xmake or download a pre-built executable from the Releases.
- Run the resulting executable, providing a Love2D game executable as an argument or by drag-and-drop.
- The tool will generate:
- A patched executable with debugger initialization code injected.
- An extracted version of the Love2D runtime.
- A
game/folder containing all Lua and asset files. - A
.vscode/launch.jsonfile with debug configurations.
- Install the Local Lua Debugger extension in VS Code.
- Open the project (The game directory) in VS Code and use the provided launch configurations to debug the game. (I recommend "Debug Balatro Love" for source editing and breakpoints.)
- C++20 compatible compiler.
- xmake build system.
- Love2D game executable to patch.
GPL-3.0 License. See LICENSE for details.
- Uses miniz for ZIP file handling.
- This Love2D forum post: https://love2d.org/forums/viewtopic.php?t=89430
- Local Lua Debugger for VS Code: https://marketplace.visualstudio.com/items?itemName=tomblind.local-lua-debugger-vscode
- Xmake build system: https://xmake.io/#/ (My beloved 😘)