Skip to content

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

Description

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.

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on May 5, 2019
  2. karrtikr commented on May 14, 2019

    @karrtikr

    Can you please be more clear here. I am not sure I understand the issue here.

    Terminal stays open so I can click again the play icon and it works

    • ... what works?
    • Please provide file content, complete exact terminal display (for eg. what does [...] represent in cd ...) and clarify the steps to reproduce.
  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on May 14, 2019
  4. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on May 14, 2019
  5. crackcomm commented on May 15, 2019

    @crackcomm
    Author
    • ... debugger?
    • Use Debug Python: Current File...
  6. karrtikr commented on May 15, 2019

    @karrtikr

    Please fill the issue template and provide the requested information. The issue is not clear.

  7. crackcomm commented on May 15, 2019

    @crackcomm
    Author

    No, thanks.

  8. karrtikr commented on May 15, 2019

    @karrtikr

    Closing this as sufficient clarification info was not provided.

  9. ghost removed
    info-neededIssue requires more information from poster
    on May 15, 2019
  10. ghost removed on May 15, 2019
  11. crackcomm commented on May 15, 2019

    @crackcomm
    Author
  12. 21 remaining items

  13. DonJayamanne commented on May 16, 2019

    @DonJayamanne

    Solution identified in microsoft/vscode#67692 could fix this.

    Updated Solution - Use conda run.

  14. bryceschober commented on Aug 7, 2019

    @bryceschober

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

  15. DonJayamanne commented on Aug 12, 2019

    @DonJayamanne

    Bryce Schober (@bryceschober) this isn't a change to the launch configuration. Instead of running user code using <python executable> <user code> we'll be using conda run <env name> python <user code>.

  16. changed the title [-]Environment is activated after debugger fails[/-] [+]Environment gets activated after debugger starts (hence debugging with conda envs fail)[/+] on Aug 15, 2019
  17. AlexH415 commented on Oct 11, 2019

    @AlexH415

    I seem to have this problem too. I don't understand what is meant by "Instead of running user code using we'll be using conda run python .". Is this a fix I can apply myself now? If so, how do I do it please?

  18. damdaepark commented on Oct 15, 2019

    @damdaepark

    Don Jayamanne (@DonJayamanne) You mean this conda run solution will be updated soon?

  19. DonJayamanne commented on Oct 15, 2019

    @DonJayamanne

    That is the plan.

  20. kimadeline commented on Apr 8, 2020

    @kimadeline

    Closing in favour of #10626

  21. ghost removed on Apr 8, 2020
  22. locked as resolved and limited conversation to collaborators on Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions