Debugging Extension Despite GoogleBreakpad on MacOS
-
Google has started deploying products with a tool called Breakpad which detects when a program is about to crash, gathers up debugging information, and allows the user to send it along to Google. This is good from a normal user standpoint, but problematic when trying to debug a native MacOS Ruby extension running inside Sketchup.
Normally on MacOS when a process crashes you get a similar native feature, but the crash report can be reviewed, which I've found helpful in determining where to start debugging. By default, Google Breakpad intercepts this process, and provides no option for reviewing the crash report before it is sent along. After a couple days of frustrating searching about this "feature" I finally figured out how to (partially) reenable the default crash reporter on MacOS, and thought I'd share it here so I didn't feel like all that time spent on it was in vain.
Via the Finder open up Sketchup.app with the "Show Package Contents" option. Navigate through "Contents" and open the "Info.plist" file. Add a new property with name "GoogleBreakpadSendAndExit" with value "NO" (see attached image). Save and restart Sketchup. When Sketchup crashes, you'll still get the Breakpad dialog, but after clicking "Cancel" the default MacOS crash reporter will appear.
I figured this out by reading through the Breakpad source code. More configuration properties are described in Breakpad.h.
I don't know how this works on other platforms, but I suspect some similar options are available.
I hope this helps someone.
Simeon
Best,
Simeon
Advertisement