VSCode launches wsl.exe processes which are not terminated after VSCode is closed - visual-studio-code

Lately, after I have been using VSCode for some time, opening and closing it repeatedly, I was surprised to see, in Process Explorer, a lot of wsl.exe processes. As it looks, 4 or 5 processes were started by VSCode each time I opened it, but were not terminating when I was closing VSCode, so I ended up with a lot of them (there are only 5 in the image, but actually there were several dozens).
I think this has something to do with the following dialog box I see (almost?) every time I open VSCode
(which I was just closing since I am not interested to install these extensions).
Does someone know how to disable the launching of these processes? I had a Docker extension which I uninstalled, but this behavior persists.

Ok, so the culprit is not this something which launches the dialog box (I still see it), but it appears to be the following setting (when checked)
After unchecking it, I don't see now any wsl.exe processes launched when I start VSCode.

Related

MobaXterm not sshing into server/VM, instead linking with my PC and can't close terminal window without shutting down PC

This is a strange one, I've had it occur a few too many times and it's difficult to give a title to, but recently on a number of occasions when I try to open one of my existing sessions (VM or Server doesn't matter) the session doesn't open, it's just a black terminal screen with nothing on it, but my Windows task bar disappears, sometimes it ends up in the MobaXterm terminal window sometimes it doesn't. But if I then try to close the MobaXterm window I get a pop up on my PC for a shutdown, and the only way to close this window is to shut down my PC.
I am running a windows 11 PC, with MobaXterm Home Edition 22.2, and have seen this in 22.1 also. Not sure which earlier versions I was running before I encountered this problem or which version it started with.
Is this a known bug, another of my colleagues has encountered this also? Is there some setup I'm missing that could prevent this?

VS Code Terminal Disappearing

When trying to run a file or just open the terminal in VS Code, the terminal opens for a half second and then promptly closes without error messages.
I've tried updating VS Code, and external libraries/environments. I'm thinking I might need to fully uninstall and reinstall, but hoping there is a easier fix.

vscode chrome attach unable to connect after some time

I have a really wired problem (or a bug) on vscode. I can "attach chrome" debugging totally fine usually,
but after some random time connecting to the chrome instance (may be a couple of hours or 8 hours, like I left it connected while I'm sleeping), it automatically disconnect the debugging,
then when I try to re-run attach chrome to reconnect it, for some weird reason it doesn't connect to the instance.
It's not a failed, it's not like "cannot connect to the port 9222", it's infinitely trying to connect showing the left up side blue indicator left to right.
This is my second time to encounter this weird problem. For the first time I even don't know how I solved the issue. maybe I just waited its reconnect for an hour or like that.
The first things I happened to think from the problem is simply its port conflict. So I checked vscode side's (I mean I use vscode in the remote ssh mode from Windows to Linux Ubuntu) port and process, used htop to filter port "9222" or process "chrome", but I didn't find anything stucking there. So I assume in the linux side the debugging process is exiting successfully.
So I did the same on the Windows side, I used resource monitor to check port "9222", no running process. If I re-open a 9222 debugging enable chrome, then it appears. closing, it disappears. It seems there is no problem here as well.
I then checked vscode's version. I was using vscode 1.64.2 so I side-installed 1.65.2 and 1.66.1 (the latest) and tested it. Doesn't work.
"refreshing the window" doesn't work. closing the window and re-open, doesn't work.
So what can I do?
Did you just install some new extensions in Visual Studio Code? I found that I had this exact same behaviour, "infinitely trying to connect showing the left up side blue indicator left to right", after I installed Karma Test Explorer and Test Explorer UI extensions. Once I uninstalled those extensions, debugging started working again.

Resize the terminal in vscode is trigger the ctrl+c to terminate the running command

I'm running the vscode 1.64.2 on Windows 10. Currently i met a strange problem, When i resize the terminal in the vscode and the cursor is focus on the terminal, Then it will trigger ctrl+c . At this time any running command would be terminated immediately .
To avoid this i have to un-focus for the terminal first and then resize it. Any suggestion here?
I was searching about this with no luck. Today I realized about one installed software on my machine that has a global hook on mouse selection. In my case was the QTranslate software. When I exit the application the problem was solved.
Check if you have this or another software that has a global hook on mouse selection.
In VS Code this problem (control C) was happening for any command line inside the terminal. Apart from that, opening Git bash (standalone) I was having the same issue, but not for cmd or another command line.
Hope this helps you because this was driving me crazy.
Absolutely working solution!
I experienced the same problem with mouse strange behavior for a long time, but finally I found out it was the QTranslate's guilt! After I stopped it, the problem has gone. (can't vote up because of my virgin profile here).
PS: I found the solution how to push work both QTranslate and terminal window - just set QTranslate setting "Advanced->Copy action" to "Ctrl+Insert" instead of Ctrl+C.

VS Code Terminal Not Allowing Typing

My VS code terminal was working fine, until one day when I tried to work on a project, that was still open in VS code, my terminal didn't allow me to type any commands. I couldn't type anything. This is the screen that I get.
Okay, for those of you struggling with the same problem, I've managed to solve it by clicking on the drop-down menu that says powershell and changing it to cmd.
this happened to me and simply
close vs code
right click on it
run as administrator
open the terminal and it will work
this problem happened when I changed the default path of CMD
For me, I tried using Powershell/CMD/Bash and I was having errors/blank terminal. I found typing echo hello and pressing CTRL + C made it appear. So in fact, everything was working, my terminal was just blank/glitched out, but was really accepting input.
I had a similar issue when running ionic serve command which runs the development server on the localhost. I paid attention after executing the command above, and it said:
Use Ctrl+C to quit this process
Pressing Ctrl+C then displays:
Terminate batch job (Y/N)?
Type Y or y
then the command prompt is shown again!
Here is a sample terminal window - trimmed for brevity:
For who has this problem using React. This happens when you start a live version using npm start. The terminal that handles the live version of the app cannot be used for anything else.
So to continue using the terminal you need to open a new terminal to use in parallel. To do so just click on the plus icon in the top right corner of the terminal panel then choose the "Power Shell" option. This will open a new terminal without restarting visual studio.
In Mac, when working with Python, this helped me: instead of clicking on the "Run Code" option, click on "Run Python file", in the right corner.
For Ubuntu users this is solved by this solution:
File -> Preferences -> Setting -> Features -> Terminal -> Inherit Env
I found two vscode on my desktop, I opened the other one and it worked. Looks like I updated it but the older one didn't disappear.
If typing Ctrl+C can help to get out of this frozen state, that will be easier to do with VSCode 1.64 (Jan. 2022)
The terminal can type the answer for you.
Terminal -- Auto-reply
The terminal is now able to automatically reply when a specific sequences of characters is received.
A good example of where this is useful, which is also the only default case, is the Windows batch script message Terminate batch job (Y/N)? after hitting Ctrl+C when running a batch script.
This typically just ends up causing problems for the user.
The terminal will now automatically reply with Y and enter (\r) which makes Ctrl+C in Windows feel much better.
Pressing Ctrl+C will immediately reply to the question and return to the prompt:
Theme: Sapphire
The feature was made generically so you can setup custom replies for other thing, just be careful when doing this as you are sending text to the process automatically.
For example you could use it to automatically update Oh My Zsh when prompted:
"terminal.integrated.autoReplies": {
"[Oh My Zsh] Would you like to check for updates? [Y/n]": "Y\r"
}
If you use Clink and enable their similar feature, you can disable it in Clink or in VS Code by setting the reply to null to avoid the two features conflicting with each other:
"terminal.integrated.autoReplies": {
"Terminate batch job (Y/N)": null
}
Go to terminal, preferences, settings.
Check "run code in terminal"
Restart VS.
I changed from bash to powershell in terminal first but the command prompt still not shown.
Then I navigate to File -> Perferences -> Settings and it starts working (command prompt shown)
This seems to just be a display problem. It happened to me when I changed my display settings for desktop icon and app scaling settings.
I managed to fix the problem by simply restarting my computer and re-opening VS code
I had the same problem ... In my case just run vs-code as administrator and works