Closed Sheepolution closed 4 years ago
The issue here is that Love adds it's own custom loaders to require
to resolve scripts in the game folder (see here). The debugger has no real way to detect this.
One workaround would be to set the current working directory to the game folder:
{
"configurations": [
{
"type": "lua-local",
"request": "launch",
"name": "Debug LÖVE",
"program": {
"command": "love"
},
"args": [
"${workspaceFolder}/game"
],
"cwd": "${workspaceFolder}/game"
}
]
}
Cases like this may warrant adding a new configuration option (scriptRoot
or something), though.
Thanks for the workaround, it works great!
I have my project set up in such way that my workspace has a folder
game
, and in that folder is mymain.lua
.My
launch.json
looks like this:When debugging, it does pause at the breakpoints, but it doesn't open the files and the line does not get highlighted.