devcat-studio / VSCodeLuaDebug

Visual Studio Code debugger extension for Lua 5.1/5.2/5.3

Home Page:https://marketplace.visualstudio.com/items?itemName=devCAT.lua-debug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spaces in launch.json arguments

Leadwerks opened this issue · comments

I have a launch.json file like this:

    "version": "0.2.0",
    "configurations": [
        {
            "name": "launch-lua",
            "type": "lua",
            "request": "launch",
            "workingDirectory": "${workspaceRoot}",
            "sourceBasePath": "${workspaceRoot}",
            "executable": "${workspaceRoot}/Engine_d.exe",
            "arguments": "-script \\\"${file}\\\"",
            "listenPublicly": false,
            "listenPort": 56789,
            "encoding": "UTF-8",
            "env": {}
        }
...

If the file has a space in the path, the parameter gets cut off when passed to the program. Here is my C++ program's output when I just print out the argc / args array:

script
"c:\Users\User\Documents\Leadwerks\Projects\My

The full path "c:\Users\User\Documents\Leadwerks\Projects\My Game\Scripts\main.lua" gets cut off.