在Visual Studio Code中调试时,在git-bash中无法正确显示Unicode &g



我尝试在rust中调试cli应用程序。在集成终端的任何配置文件中运行它会导致它显示不正确的框图字符

显示"ÔöÇÔöÔÇöÇÔöÇ"而不是"─────────────"

chcp.com 65001设置为集成终端配置文件的参数确实修复了cmd和PowerShell,无法使其在Git Bash中工作

当我尝试在外部终端(使用Windows终端)打开它时,它总是打开CMD,即使我有一个默认配置文件设置为Git Bash为VS Code和Windows终端。

在windows终端中手动运行程序本身可以正常工作。

我试着在VS Code中调试TUI应用程序,并期望能正常显示。

感谢@Finomnis我错过了参数中额外的bash参数。现在就可以了

完整对象:

"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell",
"args": ["-NoExit", "/c", "chcp.com 65001"]
},
"Command Prompt": {
"path": [
"${env:windir}\Sysnative\cmd.exe",
"${env:windir}\System32\cmd.exe"
],
"args": ["-NoExit", "/c", "chcp.com 65001"],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash",
"env": {
"LANG": "C.UTF-8"
},
"args": ["-c","chcp.com 65001;bash"]
}
}

最新更新