Debugging multiple scripts with PrimalScript
- Written by Alexander Riedel
- Last Updated: 22 April 2016
- Created: 11 October 2012
- Hits: 1080
Debugging a simple script with a few lines is not a big deal, hit debug and step through it. Almost any PowerShell related editor can do that today. But what if you need to debug a complete system of scripts interacting with one another? PrimalScript has the ability to debug multiple scripts.
Sure you could type Set-PSBreakPoint –script filename.ps1 –line xxx as needed and launch the whole thing from the command line, but let’s face it, if you do that more than twice it gets a bit old.
PrimalScript already saves your breakpoints with your files, so once you set them they are just there. Now, just open the files you need and select the new “Debug Multiple Scripts” topic.
Select the startup file and the secondary files accordingly:
And click OK. That’s it, the debugger will now just pace through your files and stop at your breakpoints:
Hitting the first breakpoint in our startup file
Hitting the breakpoint in the second file
And a third file
And one more file down the chain
And back at the second breakpoint in the startup file.
Now it is pretty easy to make modifications and repeatedly debug the entire system.
This feature requires PrimalScript v6.5.132 or higher.
This will also be supported in PowerShell Studio v3.1.9 or higher.