import ptvsd
ptvsd.enable_attach("my_secret", address = ('0.0.0.0', 3000))
#Enable the below line of code only if you want the application to wait untill the debugger has attached to it
#ptvsd.wait_for_attach()
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceRoot}",
"remoteRoot": "C:/temp/myscripts",
"port": 3000,
"secret": "my_secret",
"host":"ipaddress or 'localhost'"
}
Details:
remoteRoot: Is the path to the script file on the remote machine.port: Is the port to connect to the remote machine onremoteRoot: Is where the source python files are located on the serversecret: Is a pass phrase used to authenticate for remote debugginghost: Is the ipaddress to the remove server. You can also use the value localhostimport ptvsd
ptvsd.enable_attach("my_secret", address = ('0.0.0.0', 3000))
#Enable the below line of code only if you want the application to wait untill the debugger has attached to it
#ptvsd.wait_for_attach()
{
"name": "Attach (Remote Debug)",
"type": "python",
"request": "attach",
"localRoot": "${workspaceRoot}",
"remoteRoot": "C:/temp/myscripts",
"port": 3000,
"secret": "my_secret",
"host":"ipaddress or 'localhost'"
}
Details:
remoteRoot: Is the path to the script file on the remote machine.port: Is the port to connect to the remote machine onremoteRoot: Is where the source python files are located on the serversecret: Is a pass phrase used to authenticate for remote debugginghost: Is the ipaddress to the remove server. You can also use the value localhost