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
Many people shove in a main.py file to make their Python "Package" folder runnable directly. Sadly the Python tools and project type is not smart enough to automatically detect that if you set Startup File to the name of the folder that what it should do instead is actually check and see if the folder has a main.py file inside of it. If so run it just like py -m <folder name> would do from the command line. This functionality is lacking there is good need of this support as it is stupid that one must make a separate vs_main.py file and inform people NOT to use that file and to execute it with py -m <package name> instead with the vs_main.py file being only for debugging in Visual Studio. If this gets fixed then people can remove this needless file which would help keep source trees clean and prevent having similar problems like this in the future just because one needs to be able to debug the code within Visual Studio. What is even more ironic is that this support is built into the JetBrains IDE's and it supports this use case out of the box, except one issue YOU CANNOT DEBUG PYTHON C EXTENSION MODULES within most of their IDE's on top of their Python code if there ever is a problem that one must investigate in both normal Python code and in C extension code.
Original Comments
Feedback Bot on 4/22/2024, 00:40 AM:
(private comment, text removed)
The text was updated successfully, but these errors were encountered:
This issue has been moved from a ticket on Developer Community.
Many people shove in a main.py file to make their Python "Package" folder runnable directly. Sadly the Python tools and project type is not smart enough to automatically detect that if you set
Startup File
to the name of the folder that what it should do instead is actually check and see if the folder has a main.py file inside of it. If so run it just likepy -m <folder name>
would do from the command line. This functionality is lacking there is good need of this support as it is stupid that one must make a separatevs_main.py
file and inform people NOT to use that file and to execute it withpy -m <package name>
instead with thevs_main.py
file being only for debugging in Visual Studio. If this gets fixed then people can remove this needless file which would help keep source trees clean and prevent having similar problems like this in the future just because one needs to be able to debug the code within Visual Studio. What is even more ironic is that this support is built into the JetBrains IDE's and it supports this use case out of the box, except one issue YOU CANNOT DEBUG PYTHON C EXTENSION MODULES within most of their IDE's on top of their Python code if there ever is a problem that one must investigate in both normal Python code and in C extension code.Original Comments
Feedback Bot on 4/22/2024, 00:40 AM:
(private comment, text removed)
The text was updated successfully, but these errors were encountered: