Error "No module named ptvsd.__main__" with ptvsd version greater than 4.1.1 #2698
Labels
area-debugging
bug
Issue identified by VS Code Team member as probable bug
info-needed
Issue requires more information from poster
Environment data
Environment data
VS Code version: 1.27.2
Extension version (available under the Extensions sidebar): 2018.8.0
OS and version: Windows 10
Python version (& distribution if applicable, e.g. Anaconda): 2.7
Type of virtual environment used : N/A
Actual behavior
After upgrading ptvsd to 4.1.2 or 4.1.3, getting below error when I try to debug any Python file.
C:\Python27\python.exe: No module named ptvsd.main; 'ptvsd' is a package and cannot be directly executed.
After 5-10 seconds, a message window appears which says "Timeout waiting for debugger connection"
Workaround is to go back to ptvsd 4.1.1
Expected behavior
Debugging should be possible for Python scripts with "Python: Current File" as well as "Python: Flask" configurations
Steps to reproduce:
Open a flask application or a single .py file in VS code.
Make sure you have ptvsd version 4.1.2 or 4.1.3
Set the debugging configuration to 'Python: Current File' or "Python: Flask"
Try to debug using F5.
An observation:
I started a Python prompt on integrated terminal and imported ptvsd.
ptvsd.file refers to
"....vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\init.pyc'
The ptvsd.version returns 4.1.1 although I have pip installed ptvsd 4.1.2
Logs
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)C:\Python27\python.exe: No module named ptvsd.main; 'ptvsd' is a package and cannot be directly executed
The text was updated successfully, but these errors were encountered: