Q:

Vscode debugger importError

I try to debug my remote django project by vscode debugger.  When the program launched, the module I install in the virtualenv is not used, but the module in vscode is used.  I found this by printing the module
import completion
print(completion)

#output
<module 'completion' from '/root/.vscode-server/extensions/ms-python.python-2020.1.57204/pythonFiles/completion.pyc'>

but in the remote python manage.py shell:
import completion
print(completion)

#output
<module 'completion' from '/{my_python_path}/site-packages/completion/__init__.pyc'>

the launch.json is:
{
    "version": "0.2.0",
    "configurations": [        
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "console": "integratedTerminal",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading"
            ],
            "justMyCode": true,
            "pythonPath": "${config:python.pythonPath}",
            "django": true
        }
    ]
}

I delete the completion.py in /root/.vscode-server/extensions/ms-python.python-2020.1.57204/pythonFiles/ then the program launch success...But it may break some features? 
What is the completion module used for? 
How to import the module from the virtualenv? 

A:

It's because that directory gets put on your sys.path to load the debugger.  Feel free to open a bug at https://github.com/microsoft/vscode-python to consider renaming the file so there's less of a chance of clashing with one of your own files.