Oh, crap, a bug!

This command no longer returns the names of every property declared in a script.

Instead: {“required import items”}

tell application "Script Debugger"
	tell its document 1
		set allProperties to name of every script property
	end tell
end tell

→ Mac OS: 15.7.1 (24G231)
→ Script Debugger 8.0.10 (8A88)
→ SD Notary 2 2.0 (102)
→ FastScripts 3.3.8 (1967)

property thing1 : "Hello"
property thing2 : "Goodbye"
tell application "Script Debugger"
	tell its document 1
		set allProperties to name of every script property
	end tell
end tell

When I run the above script, I get:

{
	"required import items", 
	"thing1", 
	"thing2"
}

It seems simple enough to just ignore the “required import items” bit.

→ Mac OS: Tahoe 26.2 (25C56)
→ Script Debugger 8.0.10 (8A88)

In some scripts with multiple properties that’s the only value it returns.

Can you show us an example of this? I cannot reproduce what you are experiencing.

Works here:

This also works as expected on my computer; the value of allProperties is a list of the two properties.

Mac Studio M3 Ultra
macOS 26.2
Script Debugger 8.0.10

OK this is the command that is in a script that has run flawlessly for years and now errors out.


property thing1 : "Hello"
property thing2 : "Goodbye"
tell application "Script Debugger"
	tell its document 1
		set allProperties to rest of name of every script property
	end tell
end tell

After toying with this for a while the command I posted above also began to fail, but worked after a SD restart.

When “required import items” is included, it’s a sign you’re using AppleScriptObjC.

here, I have to use parentheses:

		set allProperties to rest of (get name of every script property)

I had already come up with a couple workarounds before I posted, this wasn’t a call for help but more reporting a bug. (I pull the property names in a handler, outside the SD tell).

Try that inside a Script Debugger tell.

property thing1 : "Hello"
property thing2 : "Goodbye"
property propList : {10, 20, 30, 40}
set anylist to {0, 1, 2, 3}
tell application "Script Debugger"
   
   tell its document 1
      set anylist to the rest of  anyList
      set propList to the rest of propList
      set allProperties to rest of (name of every script property)
   end tell
end tell

-->>Script Debugger got an error: Can’t make rest of name of every script property of document 1 into type reference.

Here’s what’s relevant:

  • The script in question has been working for years without fail. Ever since PrefsStorageLib was released. (It’s function is to set up the script for prefs storage).
  • I believe it stopped working with the last OS release.
  • It only happened inside a SD tell, and seemed to leave SD unstable after a number of repetitions while I was figuring out the details.

I hope it’s not a sign of a deeper issue. I haven’t noticed any other anomalies since upgrading.

(also, the script is not using AppleScriptObjC)

Understood.

But you left out the get I included before name – that’s what forces resolution of the list from a reference, making rest of work.

It shouldn’t be needed and I have no idea why AS is suddenly behaving differently, but this sort of issue with resolving complex references has been cropping up unexpectedly for a long time, and inserting an explicit get often resolves the problem.