Problems encountered in installing VsCode on mac

    Everything is difficult at the beginning. When installing production tools for the first time, I encountered such a difficult problem. I have tried both Baidu and Google, and all the methods on the Internet have not worked for me. In the end, I solved it by mistake. I see that there are quite a lot of feedback on this problem on the internal and external networks. I will record it here, hoping to help someone who is destined.

    First of all, I enthusiastically went to the official website to download VsCode, the universal version recommended by Visual Studio Code - Code Editing. Redefined download

     After the download is complete, click to open. There is no problem. It says to install the Chinese plug-in. After I click to install, something goes wrong, saying that I don’t have permission to create xxx:

Tried many times but did not solve the problem, thinking about restarting and trying. As a result, the problem was so serious that it could no longer be opened, and an error was reported:

    Small meaning, this level of English is not difficult for me. To translate it, it means to create the xxx folder, but a system error occurred. Let me confirm whether these two folders are writable. After the translation, I became even more confused. How can I not have permission to create a folder?

    Go directly to Baidu, which basically means that there is no permission, let this:

       Or, let's say:

    There are many other solutions from the big guys on the Internet, and no doubt, none of them work for me. At this point, let me think about it, maybe there is something wrong with the computer, and I really didn’t encounter this kind of problem on my windows computer when I went home. But as a technology enthusiast, how can we encounter problems and not solve them. So, I started trying again.

    Careful observation shows that the second path of the error is a hidden file beginning with . Then we turn on the hidden file display switch to see if this folder exists, and use the following command:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

    It can be seen that the .vscode directory exists, and I don’t know why, its creation date is May 15, 2023, and today is June 19, 2023. But seeing this folder has a red -, it doesn't feel normal:    

    Next, delete the .vscode folder directly. After deleting, start VsCode and start it successfully:

Going to look at the file path just now, it is indeed a newly created folder, and there is no redness. At this point, the problem is finally solved.

 Finally, to sum up, if you can't solve it according to the online method. Then you can try my solution:

1. Open Show Hidden Folders

2. Delete the current problematic .vscode folder

3. Start VsCode directly

Guess you like

Origin blog.csdn.net/qq_21154101/article/details/131288245