[fix] Editor could not be opened unexpected error: File is a directory (VS Code)


Visual Studio Code Error:
The editor could not be opened due to an unexpected error: File is a directory

   Reveal in Explorer View
VS Code Unexpected error- File is a directory

Reason:

You must have named the directory (folder/package) as a file name, for example, sample.py or Sample.java, and expect it to be a file.

Fix:

Delete the folder and re-create it as a file, you may click on the new file.. icon next to your project folder.

Create a New File in VS Code
Create a New File in VS Code
-




Have Questions? Post them here!