SD8: Where Did It Go?

Script Debugger 8 reorganizes and removes some functionality. This document provides a summary of these changes.

The Persistent Properties option in the Script menu

The Persistent Properties option was introduced so your scripts could emulate the behaviour of scripts in cases where properties do and do not persist. Since it was introduced, the number of situations where properties persist has dwindled, and the option is now more likely to cause confusion than be of benefit.

As of Script Debugger 8, properties and top-level value never persist: when you run or save a script repeatedly, these variables will contain their initial compiled value, if any.

As well as being more likely to match real-world behaviour, this means scripts will tend to be smaller, and reduces the risk of accidentally storing private information in saved scripts. This change also avoids problems where the presence of ASObj-C values in global variables causes script save operations to fail.

New Line Character setting in Preferences

Pressing the return key now always enters a linefeed, not a carriage return. Similarly, compiled code with use linefeeds rather than carriage returns. if you need to enter carriage returns in strings, you can type \r or use the AppleScript variable return. When compiled, carriage returns appear as a symbol, to clearly distinguish them from linefeed characters.

See this forum post for the full details.

Timer toolbar item’s detailed settings

Script Debugger 7’s Timer toolbar item showed the time elapsed on the left, and a breakdown of where the time was spent, and the number of events sent, on the right. In Script Debugger 8, the size of the toolbar item has been reduced, to accommodate the new toolbar arrangement in Big Sur.

That does not mean any details have been lost, however. The item is now a button that toggles the display between time elapsed and the detailed view. Whichever you select will persist with a document, and the default can be set via the Window menu’s Set Default Script Size & State command.

Dictionary window’s Dictionary and Object Model tabs

The tabs have been renamed, to Contents and Map.

Code signing identity menu

Script Debugger 7 supported code-signing with Apple Developer ID certificates. Since its release, this is not enough for approval by Gatekeeper — apps now need to be signed differently and notarized. Script Debugger 8 therefore removes the previous code-signing ability, in favour of passing files to SD Notary for notarization.

The new Build & Export Settings… dialog also lets you specify identity-free signing (known as signing to run locally, or ad-hoc signing) for exported apps. This is done automatically when both exporting and saving apps under Big Sur, because it is required for apps that include code for Macs running on Apple’s own processor chips.

Debug documents

When you saved a document in debugging mode from Script Debugger 7, the result was a debug document, suitable for external debugging. Security changes in recent versions of macOS have made external debugging mostly impossible, so Script Debugger 8 no longer saves debug documents.

If you save a document in debugging mode from Script Debugger 8, the result is a standard document. The only difference is that when you next open it, it will still be in debugging mode. Existing debug documents saved from earlier versions will still open as usual, but when saved will become normal documents.

As a consequence, external debugging is also no longer available.

Resources Tab’s bundle inspector settings

Most of the controls from the bundle inspector in the Resources Tab have moved to the new Bundle & Export Settings dialog, which is invoked by the Bundle & Export Settings… command in the file menu.

Two items remain in the old section: the popup menu for selecting a scripting dictionary file when saving script libraries, and the popup menu for specifying the icon file for apps. Both only appear in bundle documents (.scptd and .app).

Resources Tab’s Resources list

The Resources list has been replaced by the Contents list. It works the same, but exposes the document bundle from further up the hierarchy. This gives more direct access to directories like Frameworks.

Scripting access to AppleScript formats, colors

With the introduction of Color Themes, Script Debugger no longer relies on the system-level AppleScript formats, and other color values are also controlled by themes. They have therefore been removed from the scripting interface.

You can get a list of available themes through the available themes property, and get or set the active theme via the current theme property.

Custom theme files are stored in ~/Library/Application Support/Script Debugger 8/User Themes as .sdcolortheme files. (You can copy these to other Macs, but you need to relaunch Script Debugger after making changes to this folder.)