Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run python file in Powershell terminal for conda environments does not work the first time #1533

Closed
DonJayamanne opened this issue Apr 27, 2018 · 2 comments · Fixed by #1537
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug

Comments

@DonJayamanne
Copy link

Here's the flow of events when user attempts to run a file in the terminal via the command palette:

  1. Terminal gets created
  2. Terminal is activated as follows:
    • First going into command prompt
    • Then run necessary scripts to activate env
    • Go back into powershell
  3. Next, send command to run the python script file

Unfortunately step 3 happens too quickly. The text seems to be sent even before the terminal has completed activation.

As it is we have a delay in waiting for the terminal to get activated (around 500ms).
Unfortunately that isn't enough.

Note: Sending text to the terminal subsequently works (as the terminal has now been activated).

@DonJayamanne DonJayamanne self-assigned this Apr 27, 2018
@DonJayamanne DonJayamanne added area-terminal bug Issue identified by VS Code Team member as probable bug labels Apr 27, 2018
@brettcannon
Copy link
Member

I thought we knew about this timing problem from the beginning of adding conda support?

@DonJayamanne
Copy link
Author

Yes, we added a delay of 500ms, that's not sufficient anymore.
I'm planning on increasing this to 1s when using Powershell (i.e. I need a solution for something I can replicate consistently on my PC).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants