Runspace/Session Variable Objects Post Run

Use this forum to ask questions before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
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.
User avatar
malonejd
Posts: 2
Joined: Sat Jul 02, 2016 1:52 pm

Runspace/Session Variable Objects Post Run

Post by malonejd » Tue Jan 02, 2018 3:12 pm

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 1258 times

User avatar
davidc
Posts: 5006
Joined: Thu Aug 18, 2011 4:56 am

Re: Runspace/Session Variable Objects Post Run

Post by davidc » Tue Jan 02, 2018 3:30 pm

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.
David
SAPIEN Technologies, Inc.

User avatar
malonejd
Posts: 2
Joined: Sat Jul 02, 2016 1:52 pm

Re: Runspace/Session Variable Objects Post Run

Post by malonejd » Tue Jan 02, 2018 3:41 pm

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.

User avatar
davidc
Posts: 5006
Joined: Thu Aug 18, 2011 4:56 am

Re: Runspace/Session Variable Objects Post Run

Post by davidc » Tue Jan 02, 2018 4:18 pm

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 1237 times
David
SAPIEN Technologies, Inc.