Debugging PowerShell modules with PrimalScript 2012

The latest service build of PrimalScript 2012 (6.5.132) 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.

SNAGHTMLc10a50

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.

image

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 your develop modules and re-use your code.

This feature requires PrimalScript 2012 6.5.132 or higher.
This will also be supported in PowerShellStudio 2012 3.1.9 or higher