keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.6k stars 226 forks source link

Add vscode devcontainer support #187

Closed daltskin closed 2 years ago

daltskin commented 2 years ago

Adding support for vs code devcontainers.

For debugging of python:

image

Just add your own launch.json file to pass in debug arguments eg:

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "unifi-cam-proxy",
            "type": "python",
            "request": "launch",
            "module": "main",
            "cwd": "${workspaceFolder}/unifi",
            "pythonArgs": [
                "-X dev",
            ],
            "args": [
                "--host={your-host-ip}",
                "--token={your-token}",
                "--mac={your-mac}",
                "--cert=../client.pem",
                "rtsp",
                "-s=rtsp://{your-rtsp}",
            ],
            "console": "integratedTerminal",
            "subProcess": true,
            "env": {
                "PYTHONASYNCIODEBUG": "1"
            }            
        }
    ]
}