Stepping Through Script and Variables

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.
This topic is 6 years and 6 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
mrjoboo
Posts: 4
Last visit: Mon Sep 25, 2017 12:07 pm

Stepping Through Script and Variables

Post by mrjoboo »

To help you better we need some information from you.

*** Please fill in the fields below. 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: Powershell Studio 2017 v5.4.144
32 or 64 bit version of product: 64-bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit

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

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

I am a newbie with Powershell Studio 2017 and am trying to figure out a few of the features.

1. I am trying to step through my Powershell script, but all of the options (step through, step over, etc.) are greyed out. Is there something I have to enable or do first to have this function?

2. How do I get my variables in my script to show up in the Variables box? I would love to see them as they change through my script.

Thanks for the help!
cody m

Re: Stepping Through Script and Variables

Post by cody m »

In order to use the options (step through, step over, etc.) you'll need to set a break point in your code first near where you want to start stepping through. You can set a break point a couple different ways you can either left click on the grey portion of the script window and that will create a break point, or you can right click on the line of code that you want to pause at and in the options menu that is displayed you'll be able to toggle a break point. Once you have at least one break point enable you'll want to run the script by clicking the green debug arrow rather than the run arrow.

Using the debug arrow to run your script will also display the current values store in your variables if you are stepping through the program or display the values that your script variables had when the script has ended.
User avatar
mrjoboo
Posts: 4
Last visit: Mon Sep 25, 2017 12:07 pm

Re: Stepping Through Script and Variables

Post by mrjoboo »

Awesome! I understand and got what I need now. Thanks for the help!
cody m

Re: Stepping Through Script and Variables

Post by cody m »

Anytime!
This topic is 6 years and 6 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.