Open aphage opened 1 month ago
CodeLLDB: v1.10.0
~What inconsistencies specifically?~ Ah the output is scrambled in the latter
~What inconsistencies specifically?~ Ah the output is scrambled in the latter
yes.
This might be an issue about encoding of the terminal: UTF-8 is used during runtime, but a different encoding (possibly GBK) is used during debugging.
Due to historical reasons, Windows has not fully migrated to UTF-8, leading to this problem (which cannot be reproduced on Linux or macOS).
Can we somehow work around this? (by being explicit about encodings within the extension somewhere maybe?)
Emmm, this issue might occur wherever CodeLLDB (or the cmd) is used, so I believe the best approach is to change settings in terminal.integrated.profiles.windows
.
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell",
"args": ["-NoExit", "chcp 65001"]
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": ["/K", "chcp 65001"],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
}
Here chcp 65001
is used to enable UTF-8.
OK, should we close this issue?
rust-analyzer version: rust-analyzer version: 0.3.2053-standalone (fd74511f3 2024-07-28)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
editor or extension: Version: 1.91.1 (system setup)
relevant settings: default
code snippet to reproduce:
There are inconsistencies when clicking 'run' and 'debug' on the main function.