Howdy all,
I'm in the process of eliminating some compiler warnings in a legacy project, and have come across a compiler warning for the usage of extern void DebugStr(ConstStr255Param debuggerMsg)
, defined in MacTypes.h as part of CarbonCore-769-1.
I've looked through Apple's documentation for Cocoa and the MacOSX13.1 SDK but haven't found any leads on what I could/should replace it with.
Can anyone point me in the right direction? Thanks!!
DebugStr
has two functions:
-
It traps into the debugger.
-
It logs the supplied message.
On macOS the second part is actually done fprintf
. These days it’s better to use the system log. See Your Friend the System Log.
In terms of trapping into the debugging, the best way to do that depends on the language you’re using. The fact that you’re talking about DebugStr
suggests you’re using a C-based language, in which case my preferred option is __builtin_trap
.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"