Set-PSDebug cmdlet gives a good amount of detail, but getting to a particular point in the code requires you to add
Set-PSDebug statements in the code (which you might not be able to do) or step through all of the code up until that point. Fortunately, there is another set of cmdlets that allows interactive debugging, the
Set-PSBreakpoint, it is easy to create a breakpoint to cause the execution to be suspended when a certain line is reached using the
–Line parameter. One caveat is that the parameter sets including the
–Line parameter, also include a mandatory script parameter that refers to a file on ...