Page 1 of 1

Runspace/Session Variable Objects Post Run

Posted: Tue Jan 02, 2018 2:12 pm
by malonejd
To help you better we need some information from you.

*** Please fill in the fields below if you are currently using a Trial Version of the Product. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build:
32 or 64 bit version of product: 64 Bit version 5.4.145
Operating system:
32 or 64 bit OS: Windows Server 2012 STC

*** Please add details and screenshots as needed below. ***

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

I am an old Quest PowerGui user and one of the features I liked is that PowerGui kept all of the variables from a runspace/session listed post run. This tree view of all the objects was nice for debugging. It allowed me to drill down in the object in the variable window and see more details about the objects. I do not see this in PowerStudio. I have attached a small example print screen. Does PowerStudio have this feature?
PowerGUI-Variables.png
PowerGUI-Variables.png (52.21 KiB) Viewed 16392 times

Re: Runspace/Session Variable Objects Post Run

Posted: Tue Jan 02, 2018 2:30 pm
by davidc
PowerShell Studio does indeed display the variables, but you must first debug the script (F5) a hit a breakpoint. At which point, it will create a snapshot of the variables and display them in the Variables Panel.

Note: PowerShell Studio runs the script in a separate process and uses a new runspace on each time. It does this in order to help ensure that your scripts do not depend on modified runspaces / variables to run.

Re: Runspace/Session Variable Objects Post Run

Posted: Tue Jan 02, 2018 2:41 pm
by malonejd
The snapshot of the variable window clears after completion of the run with the breakpoint? There is no way to save the variable output window post debug.

PowerGui kept the variable snapshot post debug, and regardless of breakpoint.

Re: Runspace/Session Variable Objects Post Run

Posted: Tue Jan 02, 2018 3:18 pm
by davidc
No, it retains a snapshot of variable information after debugging in order to provide PrimalSense (Intellisense). If the panel closes after debugging, you can open it again from the Ribbon (Ribbon->View->Variables Panel):
View Variables Panel.png
View Variables Panel.png (36.48 KiB) Viewed 16371 times