title: Setting up Python remote debugging in VSCode
body: <p>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.</p>
  
  <p>Also, in the integrated terminal I can ssh to remote system and run the program using remote python interpreter which is installed on virtual environment like:</p>
  
  <pre><code>$ssh username@remoteip    
  $workon remotevirtualenv
  (remotevirtualenv)$python source.py
  </code></pre>
  
  <p>I want to enable remote debugging so that if I run the debug/run the remote files, the vscode which is installed on my local system uses my remote python interpreter.</p>
  
  <p>I went through the docs suggesting the use of ptvsd extension(which asks to have 2 copies of source files one on local, another one server) but I am not sure how to configure it in this scenario.
  Appreciate the help. Thanks.</p>
  
  <p><strong>Edit 1:</strong>
  As, I said I have gone through the docs but I am not clear how to configure in this scenario. e.g. docs say</p>
  
  <blockquote>
    <ol start="2">
    <li>In the <strong>source code on both computers</strong>, add the following lines, replacing my_secret with the appropriate passphrase to authenticate
    remote debugging, and replacing address with the appropriate IP
    address (or localhost) and port number:</li>
    </ol>
  </blockquote>
  
  <pre><code>ptvsd.enable_attach("my_secret", address = ('0.0.0.0', 3000))
  </code></pre>
  
  <p>But I have only one copy of source file i.e. on remote system. I have just mounted it on my local file system. So, should I give my local ip address or it should be remote system ip and which port number should I use as I am having only one copy of source and hence ptvsd, how is it going to communicate.
  Also, in the configuration, what should I use for <code>localRoot</code> location and <code>remoteRoot</code> location.</p>
  
  <pre><code> 3. {
       "name": "Attach (Remote Debug)",
       "type": "python",
       "request": "attach",
       "localRoot": "${workspaceFolder}",
       "remoteRoot": "${workspaceFolder}",
       "port": 3000,
       "secret": "my_secret",
       "host": "localhost" 
   }
  </code></pre>
  
  <p>Edit: Thanks to remote development extension in VSCode, remote debugging is super easy now.</p>