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代码powershell终端显示已损坏_Powershell_Visual Studio Code - Fatal编程技术网

Visual Studio代码powershell终端显示已损坏

Visual Studio代码powershell终端显示已损坏,powershell,visual-studio-code,Powershell,Visual Studio Code,我将VisualStudioCode与powershell一起使用,换行符如下所示 你知道为什么吗 VisualStudioCode版本: 我的设置文件: { "editor.fontFamily": "D2Coding", "editor.fontSize": 14, "editor.wordWrap": "on", "editor.mouseWheelZoom": true, "window.reopenFolders": "none", "w

我将VisualStudioCode与powershell一起使用,换行符如下所示

你知道为什么吗

VisualStudioCode版本:

我的设置文件:

{
    "editor.fontFamily": "D2Coding",
    "editor.fontSize": 14,
    "editor.wordWrap": "on",
    "editor.mouseWheelZoom": true,
    "window.reopenFolders": "none",
    "workbench.colorTheme": "Visual Studio Dark",
    "workbench.welcome.enabled": false,
    "window.zoomLevel": 0,
    "editor.cursorStyle": "line-thin",
    "terminal.integrated.shell.windows": "C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe"
}

您不应该为powershell.exe控制台使用SysWOW64路径

将终端设置更新为:

"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"

如果您正在运行Windows 10,您可以将其全部删除,因为VS代码将默认为PowerShell作为Windows的终端。

您是否尝试将设置文件移动到其他位置并重新启动Visual Studio代码?如果控制台在没有设置文件的情况下工作,您将知道这是设置问题。如果没有设置文件,您应该按照扩展名上的说明在GitHub页面上记录问题。我删除了配置文件并确认设置已初始化,但症状仍然存在。我将其更改为“sysnative”,但仍然存在症状。当您在代码之外打开PowerShell进程时,您没有问题吗?您是否在集成终端中看到相同的结果?是的,从外部打开powershell没有问题,只有在使用visual studio代码集成在shell中打开时才会出现问题。请向vs code powershell扩展repo提交问题。预计可能是一个错误位将是特定于您的设备。我没有这个问题,谢谢。我会的,如果结果好,我会和大家分享^^