Script Debugger for JXA

I’ve noticed at least a couple of people mention this in other threads, including:

I second this. I’ve used AS for years and am pretty proficient at it, and am now getting into JXA. I just discovered Script Debugger recently and am very impressed, except disappointed that I can’t now use it with my new JS goals.

So yes, I too would be more than willing to pay more for a SD that also supports JXA.

Anyone else? :slight_smile:
Could this happen anytime soon?

You can already debug JavaScript for Automation (or any other JSContext instance, for example the JSContext embedded in TaskPaper) with the Safari Debugger.

To get from:

to

the steps are:

  • Safari > Preferences > Advanced > Show Develop menu in menu bar
  • Safari > Develop > [Your Device Name] > Automatically Show Web Inspector for JS Contexts,
  • include the keyword debugger; at a suitable point in your script,
  • and run the script …
4 Likes

Fascinating. I thought something like this might be possible but I never investigated it fully. It’s not terribly convenient but it does let you at least see what’s happening.

@ComplexPoint Not sure if you’re suggesting this as an alternate solution (one I’m aware of, for the record, but thanks for mentioning it in case I wasn’t, and/or for the benefit of anyone else who isn’t), or if you’re pointing it out to show the tech exists for @alldritt to adapt into SD. :wink:

Of course I’d much prefer the latter - a single comprehensive app for all our macOS automation needs in one place (…and perhaps it could be made extendible [if that’s the word?] if Apple were to add other languages as peers of AS and JS in the future)…?

Please see this response:

My stance is unchanged.

1 Like

It’s pretty good actually, once you have made yourself at home with it …

(Though I find I’ve needed it much less since I gave up using variables – nothing much to watch if all names are either constants or arguments : -)

Absolutely incredible feature I’m going to use from now on, even signed up to pay respects where its due :smiley: