Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a C++ equivalent to objective-c's -debugDescription method for Xcode 7?

In Objective-C you can add a method called -debugDescription to your classes that return a string. The Xcode debugger will call this method to display the value of the class in the debugger. Is there an equivalent to this in C++?

like image 527
DavidA Avatar asked Feb 14 '26 02:02

DavidA


1 Answers

No (not with the functionality that the plain language provides). C++ has no so called root object compared to Objective-C's NSObject (or NSProxy). For such metainfo/introspection/reflection you have to use libraries like Qt or others that support such features.

like image 75
cwschmidt Avatar answered Feb 15 '26 18:02

cwschmidt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!