Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Launch a SubModule #1272

Closed
jkassismz opened this issue Mar 28, 2019 · 0 comments
Closed

Launch a SubModule #1272

jkassismz opened this issue Mar 28, 2019 · 0 comments
Assignees
Milestone

Comments

@jkassismz
Copy link

Environment data

  • PTVSD version: ms-python.python-2019.3.6139
  • OS and version: MacOS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.5
  • Using VS Code or Visual Studio: VS Code (or CLI)

Actual behavior

Cannot launch a main.py in a submodule...
ptvsd complains that the module is not found

Expected behavior

Launching a main.py method in a submodule works

Steps to reproduce:

  1. Create a main.py in a submodule.
  2. Create a launch configuration that runs it with "module": "root.sub" or use the CLI:
    /projects/pybot/venv/bin/python /Users/jkassis/.vscode/extensions/ms-python.python-2019.3.6139/pythonFiles/ptvsd_launcher.py --default --host 127.0.0.1 --port 51251 -m commands.pybot
  3. Run it.
  4. Watch the magic.
  5. Move it up one level
  6. Run...
    /projects/pybot/venv/bin/python /Users/jkassis/.vscode/extensions/ms-python.python-2019.3.6139/pythonFiles/ptvsd_launcher.py --default --host 127.0.0.1 --port 51251 -m pybot
  7. Watch the magic.
@int19h int19h self-assigned this Mar 29, 2019
int19h added a commit to int19h/ptvsd that referenced this issue Apr 1, 2019
Add sys.path entry for current directory before using runpy/importlib to resolve the module.
@karthiknadig karthiknadig added this to the Mar 2019.2 milestone Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants