Runspace/Session Variable Objects Post Run

Use this forum to ask questions after your subscription maintenance expires or 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.
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
malonejd
Posts: 2
Last visit: Tue Jan 02, 2018 2:41 pm

Runspace/Session Variable Objects Post Run

Post 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 16390 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Runspace/Session Variable Objects Post Run

Post 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.
David
SAPIEN Technologies, Inc.
User avatar
malonejd
Posts: 2
Last visit: Tue Jan 02, 2018 2:41 pm

Re: Runspace/Session Variable Objects Post Run

Post 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.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Runspace/Session Variable Objects Post Run

Post 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 16369 times
David
SAPIEN Technologies, Inc.
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.