You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error "No module named ptvsd.__main__" with ptvsd version greater than 4.1.1 #2698
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 the Developer Tools panel (toggle Developer Tools on under Help)
C:\Python27\python.exe: No module named ptvsd.main; 'ptvsd' is a package and cannot be directly executed
The current release version of the extension doesn't allow you to use your own copies of PTVSD, that was never supported. Please install the latest dev version as outlined above and test again.
This error seems to be gone now. I couldn't reproduce the error with the latest development build, although I had installed ptvsd 4.1.2.
Thank you! Please close this issue.
I wasn't aware that usage of user's PTVSD copy was never supported before, which makes this issue trivial. If it's documented, I must have missed.
Observation:
When I imported ptvsd from Python prompt, it was from my "C:\Python27\lib\site-packages" folder
Earlier it used to be from ".vscode\extensions" folder.
Question: Does this mean upcoming Python extension supports using our own copies of PTVSD?
Activity
DonJayamanne commentedon Sep 26, 2018
Please could you install the latest development version of the extension from here:
https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-build
DonJayamanne commentedon Sep 26, 2018
The current release version of the extension doesn't allow you to use your own copies of PTVSD, that was never supported. Please install the latest dev version as outlined above and test again.
MandarJKulkarni commentedon Oct 2, 2018
This error seems to be gone now. I couldn't reproduce the error with the latest development build, although I had installed ptvsd 4.1.2.
Thank you! Please close this issue.
I wasn't aware that usage of user's PTVSD copy was never supported before, which makes this issue trivial. If it's documented, I must have missed.
Observation:
When I imported ptvsd from Python prompt, it was from my "C:\Python27\lib\site-packages" folder
Earlier it used to be from ".vscode\extensions" folder.
Question: Does this mean upcoming Python extension supports using our own copies of PTVSD?