when I opened VSCode with my current jupyter Notebook,
it asked me wether I want to overwrite my notebook with a newer version. It turned out, that it took a version from a month ago and overwrote my progress (including the timeline).
Beyond the question, how it is possible that such a bug appears in VSCode, I need to know, wether I can recover my old notebook.
I do not find any file in my Code\Backups, but several files in the Cache_Data whose date would match the saving times of my old notebooks. How do I recover my notebook?
Related
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!
I recently started looking at VSCode as a possible substitute for Sublime 3 (I use Mac OS Sierra 10.13.1). I regularly work with code on a remote server, so I installed "rcode", following the steps in https://codepen.io/ginfuru/post/remote-editing-files-with-ssh.
Everything seemed to be working nicely, until I tried editing two files at the same time:
rcode file1.py
rcode file2.py
Each time I opened a new file from the remote server, the first one closed automatically, leaving me with just file2.py open.
This is really frustrating, since I need to go back and forth between them, and I can't find any information on this issue. I have the same problem using "rmate".
Has anyone else run into something similar and is there a work-around? I never had a problem working with multiple files in Sublime.
It's not a perfect solution, but if you change "workbench.editor.enablePreview" to false in your settings, rmate (and probably rcode) will open files in new tabs.
I gave a chance to Visual Studio Code as my primary editor. I had been using Notepad++ and afterwards I have been using Sublime Text 2 and 3 for few years. I do see potential of this editor and I really like it, but there is one thing I am strongly used to.
Notepad++ and Sublime Text has this feature, I can edit file and DON'T save it anywhere. After restart Notepad/Sublime Text this file is there ready for me.
Other workflow could be open any file from my local storage, close VS Code and start it again. This file will not open!
I know about that when I open folder and restart VS Code, folder is open and files as well. But is there any way how can I manage to have opened files after restart without having opened folder?
Edit: This is now implemented:
// Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.
"files.hotExit": "onExit"
I use the insider release, and in the current version (1.3.0), vscode doesn't keep unsaved file. I think there is a feature request for that.
Got it: https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/8568343-keep-unsaved-files-after-crash
You can vote for that feature, like I did !
On the other hand, You can tell in settings if you want to re-open previously opened folders, but not files.
"window.reopenFolders": "all"
Working with Visual Studio Code I have noticed if a file you are working with change, whenever that file get focused in a code panel it will be reloaded from the disk (if you don't have changes in the file through VSCode).
However, if you are on that file there is no alert to warning you about file changes.
I've been reviewing the settings and I cannot find anything like the visual studio option:
Detect when file is changed outside the environment
So my question: Is there any hidden setting or some hack to make that warning happen.
Update
Solved in version 0.3.0 of Visual Studio Code.
The file will be updated from disk if there is no changes through the editor. (very useful to read log files during a process execution)
If there are changes on both sides (from disk and through the editor) when ever you try to save the file using VSCode, the editor will warn you about that situation (i.e. "dirty writes") and a file comparison will allow you to decide what to do.
VSCode will never refresh the file if you have changes in that file that are not saved to disk. However, if the file is open and does not have changes, it will replace with the changes on disk, that is true.
There is currently no way to disable this behaviour.
{
"files.useExperimentalFileWatcher" : true
}
in Code -> Preferences -> Settings
Tested with Visual Studio Code Version 1.26.1 on mac and win
SUPER-SHIFT-p > File: Revert File is the only way
(where SUPER is Command on Mac and Ctrl on PC)
In version 1.57.1 (June 2021) there is still no setting like Detect when file is changed outside the environment.
But if the file was accidentally changed outside, you can easily revert the changes with just the Undo (Ctrl+Z) command
On Ubuntu, after creating a new file using vscode, it doesn't show up until I refresh the explorer manually. It's really frustrating. There was a key I changed in settings.json and everything worked fine after that:
"files.legacyWatcher": "on",
save, restart the vscode and be safe :)
I downloaded the tarball from this site. I selected all the notebooks in one directory and dragged them over to the IPython Notebook Dash. All of them appeared with an upload button and renaming options. So far so good.
Then this weird behaviour started. Only the files with .v2 in the filename (full name : filename.v2.ipynb) were successfully uploaded.
Screenshot of Chromium Browser
System:
Ubuntu 12.04 (23.0.1271.97-0ubuntu0.12.04.1)
Chromium Version 23.0.1271.97
I tried the following already:
1. added .v1 to the filename
2. renamed the file completely to a random string
3. couldn't reproduce the error with other notebooks
I'm guessing that you have IPython 0.12?
The notebooks without v2 are probably format version 3, which was introduced with IPython 0.13. 0.12 can't read format v3. The reason that the tarball has both is to allow for IPython 0.12 users, so you can just use those.
If you want to upgrade, the IPython PPA has the latest stable version. Be aware that this will update your notebooks to format v3 next time you save them.