Xcode's "Log Message" breakpoint action needs to be smarter

Originator:tony
Number:rdar://11422903 Date Originated:10-May-2012 06:47 PM
Status:Open Resolved:
Product:Developer Tools Product Version:ALL
Classification:Enhancement Reproducible:Not Applicable
 
Summary:

Xcode's "Log Message" breakpoint action is currently pretty useless. Doing simple logging actions like printing object descriptions as NSStrings requires jumping through needless hoops. It should be smarter. Here are a few suggestions that I'd love to see implemented:

 * Additional variables like %L for the breakpoint's line number in the current source file, the source file name and other similar information
 * More intelligent expressions — printing a NSObject subclass' description should be a matter of typing '@someObject@', not the convoluted '@(const char *)[(NSString*)[[someObject description] UTF8String]@' that only works some of the time

 As it stands, the "Log Message" breakpoint serves little purpose but to print out manually typed messages without any variables or smarts in them.

Comments

+1

Totally agree. I feel hetting this to work is worse than random.

Totally agree

By asadkhan.khan at May 10, 2012, 8:58 a.m. (reply...)

Totally agree

By asadkhan.khan at May 10, 2012, 8:58 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!