如何让 Eclipse CDT 调试器显示 unicode 字符串的内容?

发布于 2024-12-24 03:13:49 字数 395 浏览 4 评论 0原文

我有一个 C++ 项目,大量使用 ICU Unicode 字符串。最近,我开始使用 Eclipse CDT IDE,但在调试时无法查看字符串的内容。唯一的选择是将它们打印到日志或将它们转换为 std::string

有谁知道如何让 Eclipse 在“表达式”视图中显示 ICU 字符串的内容?

更新:这似乎是 Eclipse 的已知问题。 GDB 不解析 Unicode 字符串的内容。可以添加宏/函数以使 GDB 能够解析它们,但是如何让 Eclipse 在调试时在“表达式”窗口中使用它们?

I have a C++ project that uses ICU Unicode strings heavily. Recently, I started using the Eclipse CDT IDE, but I cannot watch the contents of the strings while debugging. The only options are printing them to logs or casting them to std::string.

Does anyone know of a way to get Eclipse to show the contents of ICU strings in the "expression" view?

Update: It seems this is a known issue with Eclipse. GDB does not parse the contents of Unicode strings. It's possible to add macros/functions to enable GDB to parse them, but how can I make Eclipse use them in the "expressions" window while debugging?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文