forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
In Python, files with relative imports need to be run as a module using python -m module.submodule instead of as a script (python module/submodule). This is especially important for executing the main() block within submodules for testing purposes.
Currently, there doesn’t seem to be an easy way to add the -m flag and convert the path from module/submodule to module.submodule when using the Python: Run File task. This limitation also makes it challenging to achieve the same behavior in debug mode.
It would be incredibly helpful if the extension provided a setting to enable running files as modules directly.
Sazzzzzz
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team