Trying to get Lua Debug Working on VSCode with Love2D

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Drakkahn
Prole
Posts: 28
Joined: Sat Jan 17, 2015 11:09 pm

Trying to get Lua Debug Working on VSCode with Love2D

Post 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.
User avatar
GVovkiv
Party member
Posts: 684
Joined: Fri Jan 15, 2021 7:29 am

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

Post 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
User avatar
Philbywhizz
Prole
Posts: 24
Joined: Mon May 13, 2013 3:17 am
Location: Brisbane, Australia
Contact:

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

Post 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": [
                "."
            ]

        }
    ]
}
Philbywhizz.com - a blog too far...
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests