I can view local variables in Script Debugger, in a handler, if they are defined as local.
I don’t seem to be able to view script property values (variables that are defined as properties in a Script).
Is there a way of viewing these “property” variables?
Thanks for the suggestion. It helped me identify the problem and it is a little more involved - not sure what is broken where (is it AppleScript, ScriptDebugger, pilot error = me). Something is really wrong here - or I do not understand it.
use AppleScript version “2.5”
– use framework “Foundation”
use scripting additions
on initialize()
script xyz
property x : “missing Value”
on doStuff§
local y
set x to p
set y to 4
set z to 5
set z to 6
end doStuff
end script
end initialize
local d
– local a
set a to initialize()
set b to initialize()
tell a to doStuff(3)
tell b to doStuff(44)
set d to 2
Works as expected - Script Debugger shows properties and variables variables as expected.
Interesting. The combination of the local declaration and the use of ASObjC seems to be resulting in an unexpected type being returned – I suspect it’s something like a descriptor containing a pointer to the original descriptor. Whatever, it shouldn’t be happening.