PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Python remote debugging in Kubernetes

Open yashgorana opened this issue 1 year ago • 0 comments

Description

Closes https://github.com/OpenMined/Heartbeat/issues/986

Start and run local kubernetes in dev mode

$ tox -e dev.k8s.start
$ tox -e dev.k8s.hotreload

Add the following in .vscode/launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Remote Attach",
            "type": "debugpy",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "justMyCode": false,
            "internalConsoleOptions": "openOnSessionStart",
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}/packages/syft/src",
                    "remoteRoot": "/root/app/syft/src"
                },
                {
                    "localRoot": "${workspaceFolder}/packages/grid/backend/grid",
                    "remoteRoot": "/root/app/grid"
                }
            ]
        }
    ]
}

Checklist

yashgorana avatar Feb 13 '24 11:02 yashgorana