Debugging PowerShell modules with PrimalScript
- Written by Alexander Riedel
- Last Updated: 22 April 2016
- Created: 12 October 2012
- Hits: 8319
PrimalScript makes debugging modules a bit easier. If you are developing a script module you most likely already have a script that exercises the various cmdlets in your module. Just load that script and your psm1 file into PrimalScript, set your breakpoints and hit F5 with your module file active.
This dialog will show you all the open PowerShell scripts. Just select the one you use to drive or test your module and press OK.
And there we are, hitting the breakpoint inside your module. It’s as simple as that.
All other debugging functions, including the debug console work just as always. We hope that makes it a bit easier for you to develop modules and re-use your code.
This feature requires PrimalScript v6.5.132 or higher.
This is also be supported in PowerShell Studio v3.1.9 or higher.