简体   繁体   English

宏使枚举调试知识?

[英]Macro to make enums debugger-aware?

I am using Qt Creator 4.7.0 with Qt 5.9.2 LTS. 我正在使用Qt Creator 4.7.0和Qt 5.9.2 LTS。 Is there an easy way to make the debugger ( GDB or CDB ) aware of your own enum types without having to create a custom debugging helper (eg with a macro like maybe Q_MAKE_DEBUGGING_AWARE ? 是否有一种简单的方法可以使调试器( GDBCDB )知道您自己的enum类型,而无需创建自定义调试助手(例如,使用像Q_MAKE_DEBUGGING_AWARE这样的宏?

So far only "Value of type xyz " is displayed for those custom enum values. 到目前为止,仅为这些自定义枚举值显示“ xyz类型的值”。

It worked fine before Qt Creator 4.7.0. 它在Qt Creator 4.7.0之前运行良好。 I discovered that unchecking Tools > Options > Debugger > CDB > Use Python dumper solves this and all my enums are shown correctly in all debugger output windows. 我发现取消选中工具>选项>调试器> CDB>使用Python转储器解决了这个问题,我的所有枚举都在所有调试器输出窗口中正确显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM