-
Notifications
You must be signed in to change notification settings - Fork 66
Debugging via -m
does not work when the target is a package
#991
Comments
We don't handle module (or file) launch ourselves, and just pass it on to pydevd via |
I'm not sure I follow the explanation in that bug. Python 3 can handle |
@int19h @karthiknadig you're right, my fault, sorry about that... I think I tested #748 with 2.7 and not 3.7 and this works in python 3 (and #748 was a valid bug for Python 3 and is only invalid for Python 2). |
And just to be clear, this isn't just namespace packages but any package where this is a problem. |
@fabioz Prioritize this issue over others. |
I just checked here and creating a I investigated a bit more, and having something as -- I created a pull request fixing the issue I found launching a module with dots in the name (#995), but if launching a module without dots in the name doesn't work for you it may be something different as I was not able to reproduce that. |
Note, this used to work in Hope this will help narrow down the issue. |
I doubt that this matters, because from pydevd perspective it's going to see the same |
Interesting, how then did it work in the past (older version of the extension with PTVSD 4? |
FYI someone ran into this and asked about it on Stack Overflow. |
And another post about the same issue. |
This should be fixed in |
@fabioz I'm still having trouble with this. Trying to debug
only results in the error |
@janosh, can you give details on the file structure you have for your project? |
@janosh the fix for this is not in a public release yet. You can try with master for this. |
@fabioz If the fix isn't released yet, I guess we can skip troubleshooting. @karthiknadig Can you estimate how far out the release is? |
@janosh I will be making a release likely by this Friday. |
@karthiknadig How does the update process work? Does |
Yes |
@karthiknadig Thanks for the quick fix! Module debugging works great now. |
[Found by CTI]
Environment data
Actual behavior
Message stating
No module named pkg
.Expected behavior
Be able to debug
pkg
which is a package containing a__main__.py
file.Steps to reproduce:
__main__.py
__main__.py
-m
.The text was updated successfully, but these errors were encountered: