3

I waked up today and I can't open files in VSCode!

I'm clicking on files in the VSCode Files Explorer and nothing happened. But the files from previous work are still opened.

Also, trying to navigate to Go To Definition and things like that are not working. No new files opened.

Opening file by Right-Click and select Open With... -> Text Editor is working.

2
  • I accidentally turned off the FTP Simple extension along with several other extensions while trying to get rid of the pop up suggestions... With that turned off I could still see my directory of files but not edit them... duh Commented Mar 19, 2023 at 16:59
  • I get this from time to time. Completely bizarre. Commented Sep 7, 2023 at 13:39

3 Answers 3

3

I ran into the same issue. I just deleted all the cached files here:

rm -rf /Users/<user>/Library/Application\ Support/Code

2

It seems to be a bug in one of the Python extensions.

From this result:

I figured out the issue in the error is coming from the settings.json for VS Code (found here for mac ~/Library/Application Support/Code/User/settings.json). There was an extension that updated got updated with a bug. My particular one seems like it came from this line:

"workbench.editorAssociations": { "*.ipynb": "jupyter.notebook.ipynb" }

Anyways, hope this is helpful for someone in the future!

0

For Me, I am using Ubuntu. I replaced the content of the Code.desktop file located in

/home/{user}/.local/share/applications

to be

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code %U
Icon=vscode
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.