I can't save a file in Visual Studio Code which is checked out from TFS - visual-studio-code

I want to edit a file that's checked in to TFS using Visual Studio Code, but even though I've checked it out (from within Visual Studio) I get an error when I try to save it:
"Failed to save 'myfile.cfc': A system error occured (EPERM: operation not permitted, open 'd:...\myfile.cfc')".
I've tried different file types and ensured that the Read-only attribute is off on the file, but I still can't save anything. (I can do a Save-As and edit & save that file all I want, but of course I'm not going to do that).
Does anyone know what I can do?

Sorry for the late reply - running VS Code as administrator fixed the problem.
Too bad it gives you a misleading error message.

Are you running VSCode as an admin explicitly? If not, and if UAC is enabled, this could cause the behavior that you're seeing.

Related

VS Code - Extension Details Blank post "disable gpu" fix

I apologize if this question has been answered somewhere else, but so far I am unable to locate it if it was.
Background:
As many folks have suffered the dreaded blank screen on VS Code, I deployed the recommended fix for --disable-gpu. This fix worked just fine for me and I have been using it ever since.
Issue:
Since this fix has been deployed, I'm unable to view the details page when viewing an Extension. The page/tab just shows up as blank. This happens with any extension, regardless of if I've installed it or not. This in and of itself is not a deal breaker for me, but I was hoping to use the Jupyter Notebook extension, but this seems to be impacting this as well.
If anyone has any guidance, please let me know.
Screenshot showing lack of details
I was able to get this corrected by creating a .bat file that I use to open VS Code. The code file was set up like the following:
cd C:\Program Files\Microsoft VS Code\
Code.exe --disable-software-rasterizer --disable-gpu --no-sandbox

VS Code Failed to Install Visual Studio Code Update

I am trying to update my VS Code but am getting an error message: Updates may fail due to anti virus software and/or runaway processes.
A log file stemming from my Users was attached, but I am not sure what to check for. I am still new to computers and programming.
I copied the Code.exe file from where my program was installed and pasted it to the temp map: C:\Users\YOUR_USERNAME\AppData\Local\Programs\Microsoft VS Code
I reran the update and it works.
Run the update setup file, with a name like "CodeSetup-stable-...exe", in the following location:
C:\Users\<:User>\AppData\Local\Temp\vscode-update-system-x64
Replace <:User> with your username. And make sure VS Code is closed.
The same problem happened to me as well. It was because I installed VS Code in another directory other than the default location. The problem happened because after downloading the update in the Temp directory, VS Code tried to locate the previous installation in the default location to update it. As it failed, the update setup file remained with the temporary files. The problem was solved by manually installing the update.
This is how I resolved the problem:
Close VSCode.
Run VSCode AS ADMINISTRATOR by right clicking in the VS Code icon. This process opens VScode.
Now run the same VSCODE update as usual from inside VSCode.
VSCode closes after the update process and the latest VSCODE version is installed.
This happens because you installed VSCode in a specific directory, delete and download again but leave the default directory. This is because the update file looks for the default directory
This problem appeared to me because I moved the files of the setup of the vscode from Partition to another, and the solution was very simple. I opened the file that was in the path that appeared in the alert, and the problem was solved.
Just make sure any instance vscode was closed!

Can not setup visual studio code debugger

I have downloaded VS code, but the debugger doesnt work.
It says no configurations. I put a short video to show you what happens.
Thanks a lot.
short video
I don't think it has anything to do with VS Code. The error is "Cannot find runtime 'node' on PATH", so that leads me to believe you either need to download Node.js and/or add 'node' to your PATH. Run the following line from Command Prompt:
SET PATH=%PATH%;C:\Program Files\Nodejs;
It also wouldn't hurt to reboot afterward.

Where are Visual Studio Code log files?

My VS Code frequently shows an error, something like "Error: cannot read property 'name' of undefined". The 'ESLint' tag in the status bar also shows up in red with an exclamation mark.
I suspect my team's custom ESLint plugin. I'd like to see the stack trace of the failure, which would probably confirm or refute my theory.
Does VS Code keep logs for this kind of error? If so, where are they?
(I'm running it on a Mac.)
VSCode has a couple of commands for opening its logs folders. For the VSCode logs, you can use the Developer: Open Logs Folder command, and for VSCode extensions it's Developer: Open Extensions Logs Folder. You can search for those commands in the Command Palette in the usual way.
These commands spawn a new Finder window on OSX, or open in Windows Explorer on Windows.
On Linux there are some log files under ~/.config/Code/logs. Hope this helps.
On Windows, it is at %AppData%\Code\logs
I believe this is the directory you're looking for on MacOS: ~/Library/Application Support/Code/logs/. I'm not sure if extensions typically store their logs and stuff elsewhere, but they'll likely be somewhere in the Code folder.
For clarification if anyone else stumbles on this type '>Developer: Open Logs Folder' with the forward > symbol to start

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.