VS Code Restart The PC On Its Own after some time - visual-studio-code

For a long time I have been using VS Code but from 2-3 week I cannot use it as while working my pc randomly restart. For some time I think it was my pc's fault, then I recognize it happening only when I am working on VS Code. I cannot last 3–4 minutes doing work. I have tried reinstalling, deleting extension I don't know about, even deleting all data, I Have also tried deleting VS Code cached files multiple times, starting a new sync and try using older versions of VS Code. But the problem did not go. I have also tried using default setup of VS Code with no extensions installed and no change in settings. It automatically restarts on its own. Please help me with this issue.
VS Code version: Code 1.58.2 (c3f1263, 2021-07-14T22:10:15.214Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
Spec-
|CPUs|Intel(R) Core(TM) i7-9700K CPU # 3.60GHz (8 x 3600)|
|Memory (System)|15.94GB

Related

Extension Host Terminated Unexpectedly (vs code) Mac

I have been struggling with this vs code issue (extension host terminated unexpectedly).
I've tried uninstalling/ reinstalling vs code, I've uninstalled and disabled all my extensions and still get the error, I've downloaded an older version which worked temporarily, I'm out of ideas.
I don't understand how I can have no extensions but the still get the error?
does anybody know the answer to this?
it seems I'm having the same issue as your from around the same time. I would suggest to add more infos, in my case for example
> MacOS X : 10.11.6 El Capitan
> VS Code Version: 1.57.1
> Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
> Date: 2021-06-17T13:28:32.912Z
> Electron: 12.0.7
> Chrome: 89.0.4389.128
> Node.js: 14.16.0
> V8: 8.9.255.25-electron.0
> OS: Darwin x64 15.6.0
After a long period of not using VS Code I found this alert always popping up
-Extension host terminated unexpectedly
-Open Developer Tools -Restart Extension Host
And restarting just repeated this alert.
If I choose from the context menu (aka right click) Run a line/selection or Run Current File, either on terminal or in interactive window with Jupyter, it has no reaction (while a couple of days ago it worked perfectly, when I used it in offline cause there was no wifi)
In hope it could help you, here are what I tried:
to deactivate and reactivate the extension (cmd+shift+p > Reload With
Extensions disabled)
to install a previous extension of Python ms-python.python (or whatever suit your case)
to run the command Bisect (cmd+shift+p > Help: Start Extension
Bisect)
So far I found no solution for me.
Soon I will try to follow what sumitparakh commented in this github issue , meaning to save the former extensionHostProcess.js file (renaming it) and adding in its stead the file he provided
On Windows the location should be
C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js
While MacOS path should be:
'/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js'
UPDATE 1: after adding the file and reloading I get even this message
-Your Code installation appears to be corrupt. Please Reinstall
-More information
UPDATE 2: I tried to follow this fix from a github issue . Here is the quote:
ehamwey commented on Jan 4
The following steps worked for me, after upgrading from an x86 build
of vscode-insiders to Darwin arm64 (version 1.53.0-insider) I got the
behavior described above.
Remove the folder: /Users/[your-home-folder]/.vscode/ # **NOTE:** I renamed it as a backup
This will remove all extensions and any vscode configurations from your system!
Reinstall vscode and any extensions
BUT, even after I reinstalled the same version 1.57.1 of Code the extension host error is there, without any extension yet installed...
So maybe, I should try to revert to a previous update and maybe even reporting this issue
I'm open to suggestion aswell
I solved it running in the notebook kernel:
pip install six

How do I stop VSCode from starting up maximized?

On just one of my two Linux systems, Visual Studio Code always starts in a maximized window. It doesn't do it on the other one. Both systems are Pop!_OS 20.10, upgraded along the way from each Pop!_OS release from 18.04. VSCode is 1.51.1, and has been doing this since I started using it about 1.36 or so. I'm using the default Gnome Shell on each system. On the system where it doesn't start maximized, it remembers its previous size and placement. If I double-click on the window header on the failing system, it returns to its prior placement and size, but if I close it in that state, when I reopen it it's maximized again.
I'm guessing there's a settings file or something that's set to force it to be maximized, but I didn't explicitly set anything like that, and I wasn't able to find anything when searching that would have that effect.
The failing system is one I built up with a Ryzen 9 3900X, 64 GB RAM, 1 TB M.2 PCIe 4 SSD, and an RTX 2060. The working system is a System76 Oryx Pro v4 with 64 GB and an 8th gen Core i7. VSCode has done this on the failing system ever since I was running it on a dual-hex Mac Pro, and on a 1080p monitor; I'm now using a 3840x2160 monitor - but that's what the Oryx Pro has on it, too.
What am I missing?
Following works on ubuntu 20.10. Position VSCode window where you would like it to open next time. Then, hit <Ctrl><CloseXButton>
This will close your current session. Next time you open this project via code ., you should get VSCode to open in that last state you <Ctrl>-closed it in.
I don't know where this status is stored in the settings file.

vs code: incredibly laggy terminal (on mac)

using the latest vs code, on a new installation, with only 1 plugin (which i know not to be causing the problem, since i have repeated the whole thing with another plugin; same issue) on a mac also using the latest catalina os.
issue:
writing a couple of pages (2 or 3) to the terminal, either from the terminal itself or from within the plugin, the terminal becomes unbearably slow, scrolling up or down freezes it entirely.
i found some previous links talking about this issue, but they are with older versions of vs code, and the responses have always been "this is now fixed in version xxx".
question:
is there some general setting in vs code that will prevent this?
or do you just have to wait for the next "updating", the next "breaking", the next "updating", etc?
Try this, now my terminal works faster also in Big Sur:
codesign --remove-signature /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app

Visual Studio Code - Searching triggers Windows Defender process with high CPU usage

I'm trying to move from Netbeans IDE to VS Code. I have a fresh instalation (newest version 1.29.0) without any extensions on Windows 8.1.
When I try to search a file by CTRL+E immedietly Antimalware Service Executable process (Windows Defender) spikes CPU usage for a second and my CPU fan goes nuts. Even before I type to search anything. It's very annoying.
I have excluded code.exe from Windows Defender and the entire folder within I'm trying to search. It helped a little - 98% CPU usage lowered to like 40%. Still not the result I was hoping for.
CPU is Intel Core i7-2600.
What am I doing wrong?
I believe that this is a bug in VS code. A couple of issues have been raised about it on GitHub in the last few days:
https://github.com/Microsoft/vscode/issues/63070

Visual Studio Code causing blue screen of death on Windows

I have Visual Studio Code version 1.22.2 running on Windows. When working on Javascript code, it crashes and causes a blue screen with the following technical info:
STOP: 0X0000007E
mfeavfk.sys - Address <...>
I have a plugin for MS SQL and a beautify plugin installed.
I recently updated Windows and started experiencing BSODs every time I started VS Code. Here's how I fixed it - hopefully this helps someone else:
Open a command prompt and type the following command:
code --disable-extensions
If your computer doesn't BSOD after this step, then an extension is likely causing the issue.
Press ctrl+shift+x to open the extensions sidebar
Under disabled, uninstall any extensions you aren't using or don't recognize.
Restart VS Code, and see if it still crashes.
If step 3 didn't help, try removing all extensions and then reinstalling one at a time until you find one that causes the crash. Then repeat steps 1-4, this time removing the extension you identified as causing the crash.