VSCode with Python Extension April 2019 - "Python Extension Loading..." - visual-studio-code

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.

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

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

VS Code - WSL - Go To Definition not working

Pressing F12 to Go To Definition in VS Code is not working for me with WSL extension.
I verified F12 was being recognized by turning on Screencast Mode, and that WSL is causing the Go To Definition issue by uninstalling the WSL extension and trying F12 in another project.
Is there any other information I can provide? This was working for me a few days ago and nothing changed that I know of. I tried older versions of WSL extension and was not able to get Go To Definition to work.
Thank you!
I'am using VsCode with WSL extension for C# project and the next thing helped me. It looks like you have to install extensions for each language again in 'wsl version of vsCode'. Once you open project go to ExtensionManager and try to install adequate extension (in my case for C# that was omnisharp), instead regular install button there should be 'Install in WSL:ubuntu' button. Once installation is completed restart VsCode and it should/may work.
I noticed that the terminal was stuck in "starting..." state. I think I was able to resolve this issue by installing the "Terminal Here" WSL extension.

Receiving error message 'Extension host terminated unexpectedly.' in Visual Studio Code

I have been looking around and I haven't found any answers to my issue.
I keep getting this error "Extension host terminated unexpectedly." and I have tried removing all of my extensions, reinstalling the program, trying different versions of vscode including the insider versions.
The way I get this isssue isn't from trying to use the debugger or trying to use some sort of extension, as I said before I removed all of them and the error keeps on coming back, it's simply from opening the application. I'm not entirely sure how to continue? I have had to use another editor because the error just doesn't go away. I will just have to wait for another update of Visual Studio Code I assume? I've had the issue since tuesday this week, guessing since the latest update.
Above is the error message I get. It is closed by esc but reappears very shortly after, every time.
When I open developer tools, this is what I find in the console.
Running vscode from command prompt with Code.exe --disable-extensions doesn't help.
Visual Studio Code version: 1.16.1
I appreciate any help.
Linking my github issue on Microsoft/vscode as reference
I had the same error after updating vsc to v. 1.31.0.
Disabling Live Server Extension worked for me.
Here's the error i'm getting having the extension enabled.
I started getting this error when vscode automatically updated to March 2020 (version 1.44). I have tried various suggestions given in the forum and over the internet but none of them worked.
What worked for me: I downloaded January 2020 (version 1.42) build from https://code.visualstudio.com/updates/v1_42 and ran over the previous installation without uninstalling and surprisingly, the error disappeared and all extensions are loading and working properly.
I tried following things and non of them worked:
I disabled all the installed extension from GUI.
uninstalled all the extension and installed again.
removed the left-over extensions from Windows %USERPROFILE%.vscode\extensions.
tried launching from the command prompt with --disable-extensions option.
Linking my github issue on Microsoft/vscode as reference.
It ended up being one of the base extensions that runs on startup that was the root of the problem.
In my case the git in extensions folder was causing it.
"git.enabled": false was not doing the trick so I had to remove the git folder altogether for the error to disappear.
In my case, I used typescript-hero extension. Disabling this extension fixed my problem.
It's temporal fix but maybe will help somebody.
I disabled all the extensions with name Live for example Live Server, Live Share etc and restarted my vscode again and it worked for me.
For me this was happening due to HTML CSS Support extension. so i removed it and restarted vs code and voila! it worked!
I had to uninstall few extensions related to Java (debugger for java, Test runner for java, extension pack for java etc) to make the error go away.
Click on the developer tool option that popups and see if it has the extension which is causing this error.
I got same issue and it was because of Color Highlight Extension. I just uninstalled Color Highlight Extension and its working fine and NO ERROR.
Me too. My failure has no "Code":
Extension host terminated unexpectedly. Code: null Signal: SIGABRT
MessageService.ts
I recently ran into the same error message after accepting a permission to run a program on the extension livepreview. It corrupted all other extensions where it could not find the commands. I deleted all extension files and reinstalled the other extensions without a problem. I tried liveserver again but It never prompted me again for permissions and still, the error message keeps occurring. I'm assuming liveserver was trying to ask the computer permission to run a local server after which is still accepted but something else is interfering with the computer being able to translate from the program to actually building and accessing the local server.
In my case, the live server extension was causing this issue in 1.31.0v of VS Code. After uninstalling the extension it started working correctly.
In my case it was from the extension "Todo Tree". It was breaking on a particularly large file in my project (13.7mb), with the error saying the file was over the max-size for a node-buffer (used by the C regex matcher).
Resolved the issue by disabling the extension.
I also opened an issue for it here: https://github.com/Gruntfuggly/todo-tree/issues/135
I had same problem with following error in my VSCode console.
`1: node::DecodeWrite
2: node::InternalCallbackScope::Close
3: v8::internal::VirtualMemory::TakeControl
4: v8::internal::PerThreadAssertScope<4,1>::PerThreadAssertScope<4,1>
5: v8::internal::operator<<
6: v8::internal::operator<<
7: 00000073ECF04481`
I solved it by uninstalling Angular Console extension. Not sure if it was that particular extension or some other memory issue but problem went away as soon as I uninstalled that.
Remove all Extensions which are located in a per user extensions folder. Depending on your platform, the location is in the following folder:
Windows %USERPROFILE%\.vscode\extensions
macOS
~/.vscode/extensions
Linux ~/.vscode/extensions
Restart vscode and start installing extensions.
I am not sure why this caused , but the Antivirus was throwing popups that something like extensionprocess.js file was repaired.
Disabled the Antivirus and re-installed Vscode and it was back to normal.
Hope this helps.
Here is what helped me:
Ctrl+Shift+P --> type: "Disable"
and click Disable all installed extensions
(alternatively click Disable all installed extensions for this Workspace)
Then go to extensions panel on the left and re-enable slowly those that you really need.
See which extension (or their combination) triggers that error.
It will be highly appreciated which extenstion/combination you'll find guilty as there may be several of them, and different in time...
for me, it was code runner extension I just disabled it.

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.