forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
community askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionality
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, ignatiusoey09 and Kendr1ckFu
Metadata
Metadata
Assignees
Labels
community askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionality