Support Forums

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.

Forum rulesDO 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.

I am wondering how to get the variables pane working? It should be able to display the current values of variables during any run (like powergui does) correct? Right now I can't get it to display anything, even when debugging. This is an incredibly useful feature in powergui all the time - not just during debugging - so I hope we can figure this out.

Ok, so I will try to answer this as best as I can. There are some philosophical differences here.
PowerShell Studio (as well as PrimalScript) is a Script Development Environment. The PowerShell ISE (to use another example) is a learning tool and a console. The requirements for both are quite different.
When developing a script and debugging it, reproducing results and maintaining exact start conditions is paramount. Otherwise you just fudge things and your script will only work on your machine. That is why every time you run a script in PowerShell Studio (debugging or not) you get a new, fresh and empty runspace.
Which leads to the variables pane. It shows you the state of variables while debugging AND when stopped at a breakpoint. Outside of that context neither any variables nor their state can be displayed because they simply do not exist.
So if you just run your script or run it in the debugger WITHOUT any breakpoints, that variable window will just be empty.

Of course you are correct that sometimes it is helpful to examine the state of variables after a script ran. Specially when it didn't work, you may need to see what happened. Specially in this horrible cases where everything works fine when debugging step by step but not when you run a script just by itself.
In that case just run your script in the built-in console (Ctrl+Shift+F5). Then you can go in after the fact and examine everything in that console.
For those lurking and asking why this is not some fancy graphical do-it-all console rather than a bare-bones PowerShell console, again, this is to help you reproduce results. It will not help you if you test your script in some hyper-modern custom shell implementation we created. You need to always test in the environment you will ultimately run your scripts, which is usually the good old PowerShell console.