Debugger access to global variables
Saxon 9.6 does not replicate the behavior of previous releases in providing visibility of global variables that are unused (that is, where the global variable is declared but never referenced). The desired behaviour is that searching in the Executable should reveal the existence of such variables, but they should be marked as unused and should not be pre-evaluated.
A patch is being committed to achieve this behaviour. When the compileWithTracing option is set on the XsltCompiler, Saxon will create GlobalVariable objects and register them in the Executable even if they are unused; but they will be marked as unused, and no bindery slots will be allocated. During Controller.preEvaluateGlobals() (which is executed only if a TraceListener is registered), global variables that are marked as unused will not be evaluated. A new method GlobalVariable.isUnused() is provided to test whether a variable is marked as being unused, in which case it MUST NOT be evaluated.
Please register to edit this issue