Is it possible to use the Nova debugger to debug a Nova extension?

While developing a Nova extension I would like to use Nova’s built-in debugger. I can’t seem to find a way to do it. The Chrome and NodeJS tasks don’t seem to help. I try setting my extension’s main JS file as the script path for the NodeJS debugger but that doesn’t do anything.

It seems like this should be something that exists.

Unfortunately, no. We’d love this, as well, but at the moment it isn’t currently possible.

Nova’s extension runtime uses Apple’s built in JavaScriptCore engine, part of WebKit, which explicitly disallows debugging except by apps which have a special private entitlement from Apple (e.g. just Safari). Ironically, you can technically use Safari’s Develop menu and dev tools to debug a Nova extension runtime context.

Moving Nova to another JavaScript engine (e.g. V8 or Deno) would not be possible without major rearchitecting due to our use of a lot of WebKit’s features for bridging into Objective-C code which would have to be replicated or replaced with some from-scratch solution. It’s possible, just way more work than we’re prepared to try anytime soon, sadly.

2 Likes

Ok makes sense, thanks for the info.

So I can debug an extension with Safari though? I see my extension in the Safari develop menu and I can open an inspector window for it. But I don’t see any output in the console, the sources list is empty, and my debugger statement isn’t getting triggered.

I just want some way to debug an extension if possible and if I can get Safari to do it that would work for me. Right now, it doesn’t seem to be working.