Debugging on macOS

Does SketchUp have the “” entitlement set?

Recent versions of macOS have made it impossible to debug any ‘native code’ plugins without that:

You cannot attach a debugger unless one of the following applies:

  • The host application has “” to enable debugging.

  • The private developer key used to sign the host application is in the user’s keychain.
    This would allow (some) SketchUp employees to debug plugins, but nobody else.

  • You have disabled System Integrity Protection using crsutil in Recovery mode.
    This does not appear to be supported, Apple have implied this will be removed ‘soon’.

It is unclear why Apple have such a dislike of software development on their platforms.

I split this into its own topic. I also have to ask internally about this.

But we’re talking about debugging Ruby C extensions, right?

What macOS and Xcode versions are showing this issue? (I’ve not seen it, but I’m also not on the latest macOS version.)

I am referring to Native Code using the C API. I don’t use Ruby so can’t comment on that.

This limitation applies to all macOS since Catalina or Big Sur (Gatekeeper strictness varies). It makes it almost impossible for anyone who is not a SketchUp employee to debug their native code plugins.

I first encountered this when writing a plugin for Vectorworks. It turned out to be straight-up impossible to debug on Mac, as the debugger could not be attached at all.

As you’re a SketchUp developer, you probably won’t encounter the problem if you’ve got the SketchUp private key installed on your Mac, or you’re debugging a build of SketchUp itself that was compiled on your own Mac.

That said, some of the recent noises off about Ventura imply that get_task_allow is going to be removed or ignored.

I do not know how (or indeed whether) Apple intend for 3rd party plugin developers to debug their native code plugins in applications like SketchUp.

Please get in touch with Apple and find out how a 3rd-party developer is intended to debug their plugins on macOS, and what settings SketchUp needs to make to permit this.

1 Like

When you say Plugin in this context, do you mean and importer/exporter?

I mean third-party native or Rosetta2 code running inside the SketchUp application process.
Doesn’t matter what that code is for.

Hm… I write extensions that have Ruby C Extension binaries, haven’t had a problem debugging with retail SketchUp builds. But maybe I haven’t been using a recent enough macOS… :thinking: I’d have to look into that.

We do have that entitlement set for the SketchUp application, so you should be able to debug. I’m not sure why you aren’t able to debug, but thanks for the heads up and we will look into it.


1 Like

A bit off topic, but has there been any further attention to the problem with SketchUp crashing on launch when the ruby debugger options are set? There has been nothing said on github since March.

SketchUp crashes when launched with debugger on Monterey 12.01 and Apple silicon · Issue #34 · SketchUp/sketchup-ruby-debugger · GitHub