Visual Studio Code window has crashed - visual-studio-code

I m getting the below error in visual studio code
when i click on reopen this alert kept coming and not allowing me to write the code inside the editor. I have uninstall and reinstall visual studio code but still its showing this error.

Try terminating any Code.exe processes still alive in Task Manager

Mac only:
$ open /Applications/Visual\ Studio\ Code.app -n
For context:
-n, --new Open a new instance of the application even if one is already running. Thanks #TMG. More options can be found in the docs: https://code.visualstudio.com/docs/editor/command-line

I have VS Code v1.38.1 installed on Ubuntu 18.4
encounter a similar crashing issue (failed to launch Code) today.
It is possibly due to Ubuntu stopped while Code was open.
To resolve this issue, I did the following
$ cd ~/.config/Code
$ rm -rf Cache/
$ rm -rf CacheData/
$ rm -rf CacheExtensions/

Visual Studio Code states probable reason for that:

Related

VSCodium terminal error message => error layer=debugger can't find build-id note on binary?

I have VSCodium v1.64.2 and have this error message in my integrated terminal window upon "Run/Start Debugging" command:
2022-02-14T17:14:16-06:00 error layer=debugger can't find build-id note on binary
This error message appears on all my programs inside the terminal window. I'm learning Golang (GO) and am new to the VSCodium (VSCode community) editor. My program runs fine with no errors in my Ubuntu terminal window as well as the integrated terminal in VSCodium.
Is there something I can do to correct the error? It's not interfering with my work, but I was curious. Thanks.
According to the issue of go-delve / delve (
#latestas delve#1.8.2of 2022/02/13), this problem is not addressed, so
install delve manually instead of installing with VS Code extension etc
# Install at tree head:
$ go install github.com/go-delve/delve/cmd/dlv#master
or
$ git clone https://github.com/go-delve/delve
$ cd delve
$ go install github.com/go-delve/delve/cmd/dlv
According to https://github.com/go-delve/delve/pull/2893, which has been merged, it should now just be a warning. You likely pulled delve before the merge, though, so updating should fix this.

Accept Incoming Change not appearing in VS Code (VS Code Version 1.61.2)

I have a problem, where I don't see the toolbar for merge conflicts in Visual Studio Code even after enabling the editor.codeLens.
Any idea what else it can be?
I tried to restart VS Code, disabling/enabling editor.codeLens.
I even installed/uninstalled Gitlens - Git supercharged.
Thank you in advance.
Reference for my inputs are from:
Accept Incoming Change not appearing in VS Code
In case someone still can't solve this issue. You can turn off the Git: Merge Editor from Setting menu.
VSCode merge conflict options not displaying
I uninstalled the VSCode and reinstalled it but doens't work.
Then I completely uninstalled the VSCode along with its data, caches, temporary files And Reinstalled it and Worked like a charm.
Before that I tried enabling CodeLens and Adding VSCode as default merge tool, difftool and whatever is available on the internet, nothing worked.
Basically what I deduce is, there is some extension that have malfunctioned your VSCode git merge tool or its settings. You can try uninstalling all extensions first before completly uninstall the VSCode
Uninstall Completely
For Mac run following command in terminalsee this answer
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist
rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist
rm -fr ~/Library/Caches/com.microsoft.VSCode
rm -fr ~/Library/Caches/com.microsoft.VSCode.ShipIt/
rm -fr ~/Library/Application\ Support/Code/
rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/.vscode/
For Windows see this answer
Go to Path: C:\Program Files\Microsoft VS Code
Double Click uninstall.exe
This will uninstall VS Code from Your Windows OS and
After uninstallation delete code folder also.
Open Run (Win + R) and Enter %appdata% Press Enter
Delete the folder code
Delete this folder as well %USERPROFILE%\.vscode according to this answer

Fail to open vscode in WSL bash on ubuntu using cmd code

When I tried to open vscode in WSL bash on Ubuntu 20.04 using command code ., it failed and the following message was logged:
/mnt/c/Users/john/.vscode/extensions/ms-vscode-remote.remote-wsl-0.50.1/scripts/wslCode.sh: 57: /home/john/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/bin/code: not found
I would like to ask how to fix this problem? Thx a lot!
I found the solution. Even though I think that you've already know it.
You need to delete the folder /home/john/.vscode-server/ with sudo rm -rf /home/john/.vscode-server.
Then, you just run code . or try to open any project that you want it.
Then a script will load and will install a new .vscode-server in your machine with the right files.

While opening VisualStudio it gives me following error

I have installed Visual Studio on my Linux(Ubuntu) machine but while I am opening it gives me error like...
By deleting the directory Code inside /home/[USERNAME]/.config, you'll be able to launch VScode again.
Step by step (replace USERNAME by your username):
$ cd /home/[USERNAME]/.config
$ sudo rm -rf Code
[enter your password if needed]
Then launch VSCode. It might probably take a moment till VSCode shows up, because the deleted folder will be recreated on launch.

VS Code doesn't add command line on path permanently on Mac

I am using VS code 1.8.1 on Mac 10.12.3 (16D32). After launch vscode, I run cmd shift p to open command search field. Then run Install code command in Path. I can see the code got added on PATH but it got removed after I close vs code. Is there a way to add it permanently?
So I've just had this issue during setup of a new laptop and found a simple (but slightly embarrassing) solution that worked for me. After faffing about with it for way too long I noticed I had left it in Downloads. I moved the .app file to /Applications and ran the command-line install function again and now the "code" command persists.
Add this to your ~/.bash_profile
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
source: https://code.visualstudio.com/docs/setup/mac
I am assuming you've checked this link.
VSCode application generally resides in /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code.
Follow these steps to access VSCode through code on shell.
Open bash_profile page
sudo vi /etc/paths
Add an extra line in the list of PATH folders as
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/
Exit from vi: Esc > :wq! > Enter Key
Restart shell. Then do echo $PATH to confirm VSCode has been added successfully.
Check code command is added by typing which code. You should see VSCode path printed on screen.
Try this link if it doesn't work out.
Edit: I am using version 1.9.1 and after I ran Install code command in Path it got added permanently.
Visual Studio Code
rm /usr/local/bin/code
ln -s "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" /usr/local/bin/code
Visual Studio Code - Insiders
rm /usr/local/bin/code-insiders
ln -s "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code" /usr/local/bin/code-insiders
For Big Sur:
From the official docs:
Note: Since zsh became the default shell in macOS Catalina, run the
following commands to add VS Code to your path:
cat << EOF >> ~/.zprofile
# Add Visual Studio Code (code) export PATH="\$PATH:/Applications/Visual Studio
Code.app/Contents/Resources/app/bin" EOF
I did this and it worked for me.
I am running Visual Studio Code - Insiders 1.23.0 on a Mac/Mac OS 10.10.5 Yosemite. I added the "Shell Command: Install 'code-insiders' command in PATH" from within VSC - Insiders. From the terminal in any directory I just add 'code-insiders .' and it launches in VSC - Insiders without issue.
Hope that helps.
For me, the problem was that Visual Studio Code.app was not in the Applications folder, but rather in the Downloads folder. Moving it there and re-running the add to path command fixed it for me.