question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment gets activated after debugger starts (hence debugging with conda envs fail)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Oct 15, 2019

That is the plan.

1reaction
bryceschobercommented, Aug 7, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I activate my conda environment for VS Code python ...
1. pythonPath property of the selected debug configuration in launch.json. My launch.json file: · 2. python.pythonPath setting in the workspace ...
Read more >
terminal not activating the conda environment : PY-23417
Trying to 'run' or 'debug' a script with my python interpreter set to my conda env does not activate the conda env, so...
Read more >
Efficient Way to Activate Conda in VSCode - Medium
With these three steps you can initiate your debug through “integrated terminal” which has the full control power to activate conda environment, while...
Read more >
Settings Reference for Python - Visual Studio Code
For general information about working with settings in VS Code, refer to User ... level of information provided, are off , error ,...
Read more >
Getting Started with PythonWin
Installing PythonWin -- Oh, and Python Environments, Conda , and Pip Python ... to debug them, and even to execute Python statements or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found