Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 我无法在Linux Win子系统的Visual Studio代码中生成文件或目录_Visual Studio Code_Windows Subsystem For Linux - Fatal编程技术网

Visual studio code 我无法在Linux Win子系统的Visual Studio代码中生成文件或目录

Visual studio code 我无法在Linux Win子系统的Visual Studio代码中生成文件或目录,visual-studio-code,windows-subsystem-for-linux,Visual Studio Code,Windows Subsystem For Linux,我用这个。当我执行“添加源代码文件”步骤时,我会看到以下报告: Unable to write file 'vscode-remote://wsl+ubuntu-20.04/home/alex/TEST/helloworld/helloworld' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/alex/TEST/helloworld/helloworld') 我不知道该怎么办,有

我用这个。当我执行“添加源代码文件”步骤时,我会看到以下报告:

Unable to write file 'vscode-remote://wsl+ubuntu-20.04/home/alex/TEST/helloworld/helloworld' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/home/alex/TEST/helloworld/helloworld')

我不知道该怎么办,有人能帮我吗?

VScode需要权限

在WSL终端上尝试此命令

sudo chown -R username /path/to/working/directory
替换:


“username”与您的用户名和目录路径

我想这可能是您的问题,请使用
sudo
创建目录,这在您自己的主文件夹中不是必需的。小心点。