justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
97 stars 21 forks source link

Added support for passing environment variables #95

Closed dkhex closed 9 months ago

dkhex commented 9 months ago

Added launch configuration parameter env and passed it to child_process.spawn()

Feature was made for SDL_VIDEODRIVER var, e.g.:

"configurations": [
    {
        "type": "factoriomod",
        "request": "launch",
        "name": "Factorio Mod Debug",
        "factorioArgs": ["--load-scenario", "test"],
        "env": {
            "SDL_VIDEODRIVER": "wayland,x11"
        }
    }
]
justarandomgeek commented 9 months ago

This seemed like something you would likely set for all configs, so i also put it in settings for you!

dkhex commented 9 months ago

Yea, thanks.