title: How to debug python modules with visual studio code?
body: <p>The problem: in a Python project organized as a module I cannot step into functions declared in modules imported using a relative reference.</p>
  
  <p>This is tree's output for my workspace folder:</p>
  
  <pre><code>.
  ├── LICENSE.txt
  ├── MANIFEST.in
  ├── README.rst
  ├── setup.cfg
  ├── setup.py
  └── upback
      ├── configuration.py
      ├── const.py
      ├── __init__.py
      ├── __main__.py
      ├── operations.py
      ├── path_element.py
      ├── rclone.py
      ├── tests.py
      ├── upback.py
      └── util.py
  </code></pre>
  
  <p>I want to debug upback/tests.py, to run it from command line I can use</p>
  
  <pre><code>python -m upback.tests
  </code></pre>
  
  <p>Using this configuration</p>
  
  <pre><code>{
      "name": "UpBack tests",
      "type": "python",
      "request": "launch",
      "stopOnEntry": false,
      "pythonPath": "${config:python.pythonPath}",
      "module": "upback.tests",
      "cwd": "${workspaceFolder}",
      "env": {},
      "envFile": "${workspaceFolder}/.env",
      "debugOptions": [
          "RedirectOutput"
      ]
  },
  </code></pre>
  
  <p>I'm able to launch the debug for tests.py but I cannot step into the upback function in upback/upback.py (upback is imported into tests using "from .upback import upback"). If I try to set a breakpoint there the execution stops in the calling line in tests.py and in the call stack upback appears as "Unknown source". Right clicking on the function works as expected (so the source is known to the editor but not to the debugger).</p>