jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
449 stars 137 forks source link

Include a .vscode/launch.json file to simplify development experience #607

Closed TwitchBronBron closed 2 years ago

TwitchBronBron commented 2 years ago

There are a few nonstandard folders that need to be included in the launch.json files array which means it won't work out of the box. For that reason I'd advocate for removing the .vscode folder from .gitignore so we can include an "it works out of the box" launch.json, with some documentation around how to manually set the host and password in user settings instead. The defaults host and password are ${promptForHost} and ${promptForPassword} so that'll work out of the box. Then, in user settings, you can set these values to override the defaults without needing to edit the launch.json directly.

    "brightscript.debug.host": "192.168.1.12",
    "brightscript.debug.password": "aaaa",

we could even add comments warning the users NOT to edit launch.json directly. Something like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "brightscript",
            "request": "launch",
            "name": "BrightScript Debug: Launch",
            "stopOnEntry": false,
            //WARNING: don't edit this value. Instead, set "brightscript.debug.host": "YOUR_HOST_HERE" in your vscode user settings
            //"host": "${promptForHost}",
            //WARNING: don't edit this value. Instead, set "brightscript.debug.password": "YOUR_PASSWORD_HERE" in your vscode user settings
            //"password": "${promptForPassword}",
            "files": [
                "components/**/*",
                "images/**/*",
                "locale/**/*",
                "resources/**/*",
                "source/**/*",
                "manifest"
            ]
        }
    ]
}
cewert commented 2 years ago

I've wanted to do this before but wasn't sure the best way to go about it. I think your way of doing it makes a lot of sense using brightscript.debug.host.

The comment warnings are a great idea and we would need to update the devguide.

The only downside I can see would be the risk of someone committing their roku IP and password to git on accident by editing the launch config manually. The warnings and devguide would obviously help with that.

I think making it easier for devs to help with roku outweighs that risk but that's my two cents. Curious to hear what everyone else thinks