Page 1 of 1

Trying to get Lua Debug Working on VSCode with Love2D

Posted: Sun Mar 07, 2021 9:47 pm
by Drakkahn
I'm trying to get an extension (https://marketplace.visualstudio.com/it ... ger-vscode) for vscode to work on Love2D, but no matter what I do it won't seem to work.
If I use the recommended version, then I get this error.

Code: Select all

Error

boot.lua:577: Cannot load game at path 'd:/Google Drive/Programming/Love 2D/Projects/Retro Game Engine/game'.
Make sure a folder exists at the specified path.


Traceback

[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I'm trying to use the directory "Retro Game Engine", but even if I set the args in the launch.json to the ${workspaceFolder} I still get issues with it cutting off at spaces.

Re: Trying to get Lua Debug Working on VSCode with Love2D

Posted: Mon Mar 08, 2021 10:58 am
by GVovkiv
Well, it's kinda offtopic, but i recommend use ZeroBrane for love and lua instead of VS
It has fully working word completion for love, lua 5.1 - 5.3 and other popular lua game frameworks
and in overall it great tool to work with lua

Re: Trying to get Lua Debug Working on VSCode with Love2D

Posted: Tue Mar 30, 2021 10:00 am
by Philbywhizz
I managed to get this working in VSCode with 11.3

Here is my launch.json settings. I copied the example in the extension documentation, with the exception of setting the args and scriptRoots values to "." instead of "game"

Cheers,
Philbywhizz.

Code: Select all

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug LÖVE game",
            "type": "lua-local",
            "request": "launch",
            "program": {
                "command": "love"
            },
            "args": [
                "."
            ],
            "scriptRoots": [
                "."
            ]

        }
    ]
}