Unable to open 'defaultSettings.json': Invalid regular expression: /*.xml/: Nothing to repeat - visual-studio-code

I am getting this error when trying to open the settings.json files or access preferences in VSCode. The preferences pages are blank. I have examined the settings.json file by opening it from the regular Windows File Explorer and don't see anything obviously amiss with it. I didn't see anything on the web in other questions about it. I tried deleting the settings.json file and it reset it, but I don't think that fixed it and I lose all my settings. I tried adding them back in a few at a time, to track down a setting that might be causing it and updated the recommendations, but still getting the error. I'm not sure where the "defaultSettings.json" file is. Is this a bug or am I doing something wrong? Also, I noticed that I am not able to authorize some of the OAuth logins, but I'm not sure if that is a separate issue. When the browser redirects after logging in it displays a can't access page in the browser and doesn't respond in vscode. I'm not sure if there is a setting that is missing or what is causing it. I'm also using WSL2 and Docker containers.
Thanks!
Version: 1.59.0 (system setup)
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.22000

Installed the VSCode insider edition and installed all my packages there and things seem to work with that version. Unless someone has a better idea I'll just mark this closed. I'll just use that the insider edition for now and keep the other one as a backup.

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

vscode file explorer won't auto refresh

In VsCode, if I create/delete/change files, the file explorer won't update accordingly. It was working perfect until a couple of weeks ago, but suddenly it stoped and updates only if I manually click the refresh button. I uploaded a quick 20 seconds video to youtube here to better explain the problem.
This is my VsCode version information:
Version: 1.57.1
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:26:50.042Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin arm64 20.5.0
I'm on macoS Big Sur 11.4 (20F71), and VsCode is opened in my git root repository.
Any help is appreciated!!
Not the expected solution
Some days ago, I created a second user for my Mac to use it for work, and I set it as admin with all privileges, equal to my first and main account. At first, I didn't think this had any relation at all, but in my main account in another random project I ran make command and I literally got an error message saying that I didn't have authorization to run make there. It made no sense because I did it a couple of weeks ago perfectly, curiously when the new user didn't yet exist.
This made me realize that I somehow screwed up things with this new user, and as an ex-windows user, my solution was simple: hard-factory-reset my Mac. And now, it works like a charm!
Obs.: I tried deleting the new User and also reinstalling vscode, but it didn't solve the problem, only after my hard reset.

Visual Studio Code - Add option(s) in 'select default shell' list on Windows?

I want to use various shells in VSCode terminal, eg. Git Bash. I can set it in settings.json with terminal.integrated.shell.windows, but if I select CMD as default subsequently, that setting will get replaced. And if I add another terminal.integrated.shell.windows to bash.exe, I'm stuck with bash, can't change default shell, seems logical anyway if VSCode only replaces the 1st setting, but read the last same setting value.
The problem is there's no Bash existed in the "select default shell" list, and my question is how to add that?
I have installed latest (2.22.0) 64-bit version of Git for Windows, and hoped it would add the necessary env/reg etc for that, but no.
Even though this should be version independent, nevertheless here's my VSCode About:
Version: 1.35.1 (user setup)
Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f
Date: 2019-06-12T14:30:02.622Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.10240
Please. I know there are similar questions, but they don't really solve my problem. However, the correct answer to my question will solve theirs.
If your question is how to add more terminal shells to Terminal:Select Default Shell, I dont think thats easily possible.
But you can use Shell Launcher plugin to add more shells and launch them in your integrated terminal. Below is a screen shot where I added Julia to the list.
Installation:
Go to Extensions and add Shell launcher.
Go to settings(Ctrl+,) and search for Shell Launcher and edit for your platform.
Add your shell to the list
You can launch this by F1(Command Pallete) -> Shell Launcher
My alternative solution is to use the "terminal.external.windowsExec" setting for non-default Windows shell. But you can only have one such setting!
I have this same question, and have looked through all of the documentation, and every article I can find on the subject, and haven't found the answer. I found a terminal launcher extension, but that creates a separate menu. There must be a json file somewhere that has the list of choices for the Select Default Shell menu. Does anyone know how to update that menu?
I did some more testing on this. On the Mac version (and I assume the linux version), there is a file called /etc/shells that is used to determine what to put in the menu. If there is a similar file on Windows, I'm not sure what it would be called or where it would be.
For anyone on Linux who cannot seem to find the option at all, uninstall VS Code and reinstall the latest version from the website.
I spent so much time with the same issue but the reason was that I had installed it from the pop shop on my pop OS (Linux).
The Select Default Shell command just list the shells that can be found from your %PATH% environment variable. Add the shell and restart VSCode to see it.
Here is to add a new path.
Remember that you can always start a shell from another one. Just type bash from inside CMD.

VS Code settings not opening correctly

since a few weeks now I can't open my settings correctly in visual studio code. Before this issue, two windows appeared. One with the default settings and one with the edited settings. Now only the window with the edited settings shows up.
This is some of really annoying, because I want to search for a specific default setting, but can't click on the pen to edit it. I can't change it from the ui settings as well.
I append a screenshot of how it looks in my vs code:
new settings
This is how it looked before: old settings
Specifications:
Visual Studio Code
Version: 1.31.1
Chrome: 66.0.3359.181
Node.js: 10.2.0
OS: Windows 10 Professional, Update: 1908
I am glad if anyone can help me solving that problem.

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.