I have created a Forms based project in Powershell Studio, project includes globals.ps1, startup.pss & mainform.psf.
When I include "Set-PSDebug -strict" at top of globals.ps1 I get the following error when trying to run or debug app.
Line 419: The variable '$CommandLine' cannot be retrieved because it has not been set.
However app works fine if I Build to create an exe.
I am using PowerShell studio 5.7.175.
thanks
Mike
"Set-PSDebug -strict" is stopping use of Run & Debug
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Re: "Set-PSDebug -strict" is stopping use of Run & Debug
Using 'Set-PSDebug -Strict' requires that variables must be assigned a value BEFORE being referenced in a script. If a variable is referenced before a value is assigned, PowerShell returns an exception error. Therefore if you are not passing/assigning any value to $Commandline, you will receive an error.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.