vscode-python: Environment gets activated after debugger starts (hence debugging with conda envs fail)

Environment data

  • VS Code version: Just updated
  • Extension version (available under the Extensions sidebar): Just updated
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7, Conda3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda

Issue

Use Debug Python: Current File…

> cd ...
[...]
    from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified module could not be found.

>D:/Anaconda3/Scripts/activate
>conda activate base

Terminal stays open so I can click again the play icon and it works because conda activate base activated Python environment just AFTER the debugger FAILED to start.

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21

Most upvoted comments

That is the plan.

@DonJayamanne Can you clarify your proposed solution of conda run? Are you proposing a modified launch configuration? Could you provide an example?