vscode-cpptools
vscode-cpptools copied to clipboard
display utf-8 characters on debug watch panel
From @KuddLim on July 26, 2017 8:27
- VSCode #Version: 1.14.2
- OS Version: LMDE 2 Betsy x86_64
Steps to Reproduce:
- Make a simple c++ project
- declare std::string (or std::wstring) and put some CJK string to it.
- Launch gdb session
- Watch variable
Reproduces without extensions: Yes
in vscode, variables are represented in numerics
in gdb, variable are represented correctly,
Here's the content of ~/.gdbinit
set target-wide-charset UCS-4
Copied from original issue: Microsoft/vscode#31442
I can confirm having almost the same problem. But in my case I can't display cyrillic strings in UTF-8 properly. All they are displayed in the following manner (see the image)
Same when I try to watch Chinese strings in Unicode/multibyte. It appears like this.
Well it's barely year 2000, I don't think that a modern IDE is really expected to understand more than ASCII Given the low importance of international support while computer and internet are still not wide spread outside of the US and UK markets I don't think this warrants a bugreport.
Just want to say that this issue is still present and not limited to cpp.
I feel like debugger and correct display of variable values at runtime is pretty important. And I don't understand why is this not prioritized more.
This is how the strings in my Python script look like:
@meganrogge, can you help this issue to receive an assignee
? Thanks!
cc @connor4312
VS Code supports this, it's up to the extension to send the characters over.
@sean-mcmanus, you should be the right person who knows how to put this issue on track 🙏
@Challanger524 I am not -- I work on the language server component and not on the debugger component (and I don't know much about the debugger component). Does anyone know if this can be fixed at https://github.com/microsoft/MIEngine ?
@sean-mcmanus interesting point, but...
I've checked Visual Studio 22
variables display in debugger, utf-8
strings are showing properly (with no flaws). Since MIEngine
is mutual (as it seems) for both frameworks - my assumption is that Debugger Component
in vscode-cpptools
is a good place to start digging.
Maybe @bobbrow knows who can be brought to this conversation according to the topic?
@Challanger524 It would be @WardenGnaw (or someone else on the VS debugger team), but he's not currently working on VS Code debugger issues.
UPD: noticed that vscode-cpptools
/debugger
shows utf-8
strings only if they are presented via char
ptr/std::string. So I assume that C++20 addition of char(8/16/32)_t
self-sustaining types is just not reflected in cpp-tools debugger window yet.
@Pika-Lee Have you solved that problem yet? thanks