{"id":4826,"date":"2012-10-12T05:00:00","date_gmt":"2012-10-12T13:00:00","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=4826"},"modified":"2012-10-12T09:04:24","modified_gmt":"2012-10-12T17:04:24","slug":"debugging-powershell-modules-with-primalscript-2012","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2012\/10\/12\/debugging-powershell-modules-with-primalscript-2012\/","title":{"rendered":"Debugging PowerShell modules with PrimalScript 2012"},"content":{"rendered":"<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SNAGHTMLc10a50\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/09\/SNAGHTMLc10a50.png\" alt=\"SNAGHTMLc10a50\" width=\"601\" height=\"339\" border=\"0\" \/><\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2012\/09\/image6.png\" alt=\"image\" width=\"533\" height=\"402\" border=\"0\" \/><\/p>\n<p>And there we are, hitting the breakpoint inside your module. It\u2019s as simple as that.<\/p>\n<p>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.<\/p>\n<p>This feature requires PrimalScript 2012 6.5.132 or higher.<br \/>\nThis will also be supported in PowerShellStudio 2012 3.1.9 or higher<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[410,21,25],"tags":[754,193,753,28,752,1016,37,755],"class_list":["post-4826","post","type-post","status-publish","format-standard","hentry","category-primalscript-software-news","category-software-news","category-windows-powershell","tag-breakpoint","tag-debugger","tag-module","tag-powershell","tag-powershell-editor","tag-powershell-studio","tag-primalscript","tag-psm1"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=4826"}],"version-history":[{"count":4,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4826\/revisions"}],"predecessor-version":[{"id":4950,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/4826\/revisions\/4950"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=4826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=4826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=4826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}