Extension Host Terminated Unexpectedly (vs code) Mac - visual-studio-code

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

Related

Not able to open VS Code from Terminal in my MacBook BigSur11.3.1

Good day community. I have installed VS Code in my MacBook Air M1 chip running on BigSur 11.3.1 but whenever I set the code command in PATH (using Command+Shift+P) it only appears to be working for current session and doesn't work if I restart VSCode. I have to set the code command in PATH again. Please help me in configuring code command permanently so that i can open VSCode from any directory whenever I want. Thanks
I think I have got the solution. After installing VSCode in your Mac (which will be in download folder) move VS Studio Code.app file to Application Folder and then again install the code command in PATH from VSCode(using Command+Shift+P) and thats it.

vs code not opening up in windows

whenever i try to open my vs code editor, nothing happens it doesn't launch and even there are no errors..!! And i am confused what's wrong here in my vs code. Please anyone help me fix it..!!
Below are the verbose command i typed in the terminal..
C:\Users\Avinash>code . --verbose
[main 2020-05-10T05:17:56.317Z] Error: UNKNOWN: unknown error, mkdir
[main 2020-05-10T05:17:56.318Z] Lifecycle#kill()
[main 2020-05-10T05:17:56.320Z] [File Watcher (node.js)] Error: UNKNOWN: unknown error, stat 'c:\Users\Avinash Maurya\AppData\Roaming\Code\User'
no need of Unistalling, just go to your vscode-setup and reinstall it. (by this procedure all of your's settings, files , extensions etc.. will be restored as it is.)
I also came across the same issue.
Uninstalling and Reinstalling it again worked out and all my extensions were there already(that was strange).
You may want to try "Run as Administrator".
try code --no-sandbox in kali linux
try this it worked for me!
got to the Microsoft store
install vs code form there
then an error massage will appear
now try to open your vs code and wait ...
You can try by searching vs code and if it opens you can right click it, create the shortcut and use it instead of the old shortcut. This worked for me so please try it.
Here is the best solution:
No need to uninstall or do anything.
I was also facing the same issue. Go to task manager. You'll see that visual studio code is running. Select it and press end task. Now you can open vscode normally. It's fixed!
Somehow I had two vs code installs on my computer (one user and one system) and they appeared to be conflicting. I uninstalled user and everything worked. I suggest uninstalling all versions and reinstalling using the system installer executable.
Just reinstall the vs code from previously downloaded setup, everything including extensions get restored. enjoy coding
I Have Got the Same Problem as you just open the folder where you have downloaded VS Code. Like in My case its in Drive C and open from icon in that folder.
you can fix this issue by selecting run this program as administrator under compatibility tab.
If you are on win10, kill all vscode processes, delete folder 'C:\Users\xxx\AppData\Roaming\Code', and launch vscode again.
if anyone is still wondering abt it, Microsoft ended support for Windows 7 in January, 2020 and no longer provides security updates. VS Code desktop versions starting with 1.71 (August 2022) will no longer run on Windows 7 and you will need to upgrade to a newer Windows version to use later versions of VS Code.
Thus, if you want to keep windows 7 version, you have to download an older version than 1.71 of VS Code , for example, 1.69 version (https://www.filepuma.com/download/visual_studio_code_64bit_1.69.1-32681/) and uncheck all the auto updates from the settings.
whenever you want to add any extension, you just have to choose the older version of it.
If you cannot open the vs code editor on windows 7, then you need to download the latest version 1.70.2 from July 2022, which is supported by windows 7. Here is a link as an example: https://update.code.visualstudio.com/1.70.2/win32-x64/stable

VSCode with Python Extension April 2019 - "Python Extension Loading..."

I am unable to get Python extension working with fresh install of VS Code / Python 3.7.3 on Windows 10.
VS Code status bar shows a message 'Python extension loading...' continuously.
Python is installed in a non-standard path at c:\Programs\Python\Python37-32\python
Have uninstalled both VSCode and python several times and had installed afresh.
C:\WINDOWS\system32>which python
/c/Programs/Python/Python37-32/python
When developer tools is opened, the following error shows up in console.
property 'length' of undefined
at g.update (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:373818)
at g.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:381134)
at new g (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372522)
at Function.getInstance (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372729)
at h.getSettings (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:370264)
at b.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:624877)
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93210
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93877
at module.exports.t.activate (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:96601)
at Function._callActivateOptional (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:719:166)
at Function._callActivate (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:872)
at define._doActivateExtension.Promise.all.then.e (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:79)
(Posted solution on behalf of the question author).
OK - I deleted the VS Code profile folder
'%APPDATA%\Roaming\Code
and installed fresh extension along with miniconda, and it is working fine.
This seems to be an annoying problem that is caused by other extensions. Best way I fixed mine was:
To disable all the extensions
Enable ms-python extension
Reload vs-code and voila, it's all fixed
I also had this problem. But I fixed it by changing the location of the python file.

Visual Studio Code Not Working WIN 7

I am using v 1.23.1 on windows 7
When I open visual code there are no other windows for the app that will show. If I Open a folder it will not show the code. If I click on File > Preferences > Settings it will not open the window (I assume a modal). I have uninstalled it several time, and removed everything out of %appdata% code. It has worked in the past, but it might have been a previous version.
I can't get to the remove extensions window to remove extensions
Version 1.23.1
Commit d0182c3
Date 2018-05-10T17:11:17.614Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64.
I had to do this to make it work
code --disable-gpu
As Microsoft said:
https://code.visualstudio.com/docs/supporting/FAQ#:~:text=Microsoft%20ended%20support%20for%20Windows,later%20versions%20of%20VS%20Code.
Can I run VS Code on Windows 7?
Microsoft ended support for Windows 7 in January, 2020 and no longer provides security updates. VS Code desktop versions starting with 1.71 (August 2022) will no longer run on Windows 7 and you will need to upgrade to a newer Windows version to use later versions of VS Code.
VS Code will no longer provide product updates or security fixes on Windows 7 and VS Code version 1.70.3 is the last available release for Windows 7 users. You can learn more about upgrading your Windows version at support.microsoft.com.
I was getting the same issue so I downloaded the 1.70.2 and it started working.
https://code.visualstudio.com/updates/v1_70
https://update.code.visualstudio.com/1.70.2/win32-x64-user/stable
Follow these for permanent solution:
right click the visual studio icon on desktop
go to properties
go to the path
after the end of inverted commas"..
give a blankspace and type: --disable-gpu
press apply and ok
restart now.

Extension host terminated unexpectedly

VSCode Version: 1.11.2
OS Version: Win 8.1
Below error is appearing every 10 mins.Can you please tell me how to get rid of this? I have installed only 4 extensions as shown below.
Update:
I have disabled all extensions one by one for the workspace.But still, It has the same issue.In other words, this is not the problem of extensions which I have installed.Any idea?
This worked for me.
Shift + Command + P (Control for windows)
Select Reload With Extensions disabled
Shift + Command + P again
Select Enable All Extensions
Restart VS code.
I solved this by uninstalling Live Server extension!
Open the Devtools console and look for any exceptions in localProcessExtensionHost.ts.
Uninstall the extension that shows up there.
To open developer tools:
ctrl+shift+p Developer: Toggle Developer Tools
select console.
For me, it was the Spell Right extension that messed thing up!
Just uninstalled it and restarted.
Ran into the same issue and ended up uninstalling and installing VSCode, GitBash multiple times.
Finally the issue was the antivirus which was continuously repairing the file at below location and deleting it.
Folder location - C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node
File name - extensionHostProcess.js
Hope it helps if someone ran into the issue.
I also had same issue with VS code 1.44.0 at last Friday.
Today i tried uninstall VS code in control panel and install 1.43.2 or latest version 1.44.1 and the issue was gone.
The solution: uninstall VS code and install previous version or new latest version
I had the same issue and solved it by disable all "live" extensions: live server, live chat and Chat (Chat for vscode) then reload it and it works perfectly ! :-)
extensions to disable
When it occurs with Live Sass Compiler, you may be importing a file that has not yet been created or is pointing the wrong way.
For me, I had to uninstall Angular-Essentials. It's an extensions bundle.