PS2011 No Private Variable Debug
Posted: Thu Nov 03, 2011 2:41 pm
PS 2011 V6.0.154 XP Profession SP3
When debugging a Powershell script in the Primalscript Editor/Debugger, variables that are defined as private in a function, show empty results in the Watch Window and do not appear at all in the Variables Window. Please refer to the 1st snapshot noting that $gca_CrackerUserArray that is not scoped as private appears in the Variables Window, whereas $gca_CrackerUser that is scoped as private, does not. Also please note that the Result in the Watch Window for $gca_CrackerUser is (Empty).
Also please note on the 2nd snapshot that the $gca_CrackerUserArray has a result in the Watch Window. Also please note that Primalscript crashed shortly after i took the 2nd snapshot, with an out of memory error.
NoPrivateVariableDebug.jpg
NoPrivateVariableDebug1.jpgpmclean@labelmakers.com.au2011-11-03 21:49:09
When debugging a Powershell script in the Primalscript Editor/Debugger, variables that are defined as private in a function, show empty results in the Watch Window and do not appear at all in the Variables Window. Please refer to the 1st snapshot noting that $gca_CrackerUserArray that is not scoped as private appears in the Variables Window, whereas $gca_CrackerUser that is scoped as private, does not. Also please note that the Result in the Watch Window for $gca_CrackerUser is (Empty).
Also please note on the 2nd snapshot that the $gca_CrackerUserArray has a result in the Watch Window. Also please note that Primalscript crashed shortly after i took the 2nd snapshot, with an out of memory error.
NoPrivateVariableDebug.jpg
NoPrivateVariableDebug1.jpgpmclean@labelmakers.com.au2011-11-03 21:49:09