troubleshooting Question

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

Avatar of creative555
creative555 asked on
PowershellScripting Languages
2 Comments1 Solution87 ViewsLast Modified:
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!
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros