I am having my remote(ubuntu 16.04) drive mounted on my local system(ubuntu 16.04) so that I can edit the source files by opening them in vscode.
Also, in the integrated
Please see the official docs on how to do remote debugging.
You need to put the remote ip address in both ptvsd.enable_attach("my_secret", address = ('remote_ip_address', 3000))
and in launch.json
:
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/user1/scripts/",
"port": 3000,
"secret": "my_secret",
"host": "remote_ip_address"
}
You also need to change the remoteRoot
value to the path of the directory where the script is located in the remote machine (e.g. /home/user1/scripts/
).
Finally, open an ssh connection: ssh -L 3000:localhost:3000
, run your script in the remote machine and attach the debugger in the local machine.