-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Commands sent to terminal gets swallowed by previous command #67693
Comments
(Experimental duplicate detection) |
I think this sort of thing normally happens because the command you ran consumed the input and didn't do anything with it. It doesn't happen for all commands only a subset, for example when developing VS Code you can run There's is a proposed API which lets you listen to the stream coming into the terminal which would allow you to determine when your command has run by matching some expected output: Disposing the listener after you're done with the init check is a good idea. Would this work? |
Great thanks, however we still have a problem with the debugger when using the terminal:
Again, there's a race, VSC is sending text when the previous command sent by the extension has not completed. There are a couple of solutions:
Any other suggestions? |
This sounds promising, I'm not too familiar with how the debugger uses the terminal though. |
I believe I'm also seeing the same thing here. I've seen it for running debug configurations that try and use the integrated terminal and for installing linting packages from VCS popup prompts. Using an external terminal seems to get around the issue for me currently for debugging. Here's a youtube video where both the mypy linter install gets swallowed and the debugger. |
I also notice this but with a slightly different setup. First of all here is a video on streamable showing what happens Now as for my setup:
This however only happens to me when my terminal is set to Git Bash and only happens on Windows. Git Bash itself however works perfectly fine normally. Further things to note:
My VSCode settings concerning terminal are as follows (full config on gist here): //...
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"terminal.integrated.env.windows": {"TERM": "cygwin"},
"terminal.integrated.shellArgs.windows": ["--login"],
"terminal.integrated.enableBell": true,
//... |
@Tyriar I can see the label |
@favna not sure how your issue is related to this. |
@DonJayamanne It seemed to be related in that from my understanding it was also that yarn was swallowing commands, assuming I even understood the concept correctly. I was going to create my own issue concerning the topic but I figured I should first search existing ones and so I landed here |
@DonJayamanne is there anything beyond waiting on onDidWriteData to be stabilized for the terminal? You had debug issues but they should probably be handled in a separate issue. |
All is good, thanks. |
Steps to Reproduce:
pipenv
print("Hello")
statementpipenv shell
pipenv shell
, causing the previously created environment to get activated in this new terminal.pipenv
environment will now be automatically selectedSelect Python Interpreter
Run Python file in terminal
pipenv shell
to activate the environment in the terminal<python interpreter> <file name>
to the terminalpipenv shell
has not yet completed, and the commands sent later get swallowed upCauses:
Solutions:
pipenv shell
takes longer than other activation routines, hence we need a much longer delay (i.e. a bigger magic number), a work around.Related to #67692
The text was updated successfully, but these errors were encountered: