Debugging PowerShell Modules with Pester Unit Tests in Visual Studio Code
Video Statistics and Information
Channel: Trevor Sullivan
Views: 2,746
Rating: 5 out of 5
Keywords: Microsoft, PowerShell, Visual Studio Code, VSCode, Debugging, Developer, Programming, Unit Testing, Software Testing, Automation, Coding, Learn to Code, Scripting, Shell, Administrator, Sysadmin, Information Technology, Computer
Id: ORgJCAhigs8
Channel Id: undefined
Length: 24min 37sec (1477 seconds)
Published: Thu Feb 06 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Description: If you are the author of a PowerShell module, you can use the built-in debugging tools in Microsoft Visual Studio Code to debug your script modules. In this video, we'll build a simple PowerShell script module, and then use the Pester unit testing module to write some failing tests. Then, we'll set a breakpoint in our module and break into the debugger when we execute the Pester unit tests. Once execution is paused, we'll step through the module code line by line, to discover where things are going wrong. We'll then fix the module code, and ensure that our Pester unit tests are passing.