We help IT Professionals succeed at work.

What is the best way to study the script using debugger vscode

80 Views
Last Modified: 2018-10-18
Hello,
I need to study the following script. What it does and understand it.

SO I am using debug mode in Vscode, but when I click on “Step into”, it is skipping and not going into the next line. Perhaps something is wrong with my VScode?

What is the best way for me to study the script and see what it does? How to manually paste the blocks and study?

So I set the debugger on line 1
When I click the down error Step into, it jumps into the line 206.

For example, I need to understand what does this do? How would I accomplish this with the debugger or manual process. tried copying and pasting and still doesn't understand what it tries to do
gc $sidMappingsFile | foreach {

            $orgShell = $null
            $fields = "","",""
            $fields = $_.ToString().Split(",")

            if ($fields[2] -eq "True") {
                $sourcesid = $fields[0]
                $targetSid = $fields[1]
                $isprimary = $fields[2]
         

Thank you!
Comment
Watch Question

"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thank you very much! good suggestions!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.