Debugging PowerShell Modules with Pester Unit Tests in Visual Studio Code
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. Relevant Links https://github.com/powershell/vscode-... https://github.com/PowerShell/PowerSh... https://code.visualstudio.com/docs/ed... / pspester https://github.com/pester/Pester Why should you use PowerShell classes? • PowerShell v5 0 Classes :: Why Use Them? PowerShell v5 Classes :: Property Validation Attributes: • PowerShell v5 Classes :: Property Validati... PowerShell 5.0 Classes :: All About Object Constructors: • PowerShell 5.0 Classes :: All About Object... PowerShell 5.0 Classes :: Inheritance and Base Class Methods: • PowerShell 5.0 Classes :: Inheritance and ... PowerShell 5.0 Classes :: What are .NET Enumerations? • PowerShell 5.0 Classes :: What are .NET En... Introduction to PowerShell 5.0 Classes: • Introduction to PowerShell 5.0 Classes Producer: Trevor Sullivan Website: https://trevorsullivan.net Patreon: / trevorsullivan Twitter: / pcgeek86 Gab: https://gab.ai/trevors Intro music "Amen Tune" used, with permission, from Aaron Static. Check out his music here: / aaronstatic #Microsoft #PowerShell #VSCode 0:00 Intro to Debugging PowerShell Modules 2:30 Create Sample PowerShell Module 3:53 Add Function to Return Class Instance 10:10 Create Pester Test File 12:15 Add Describe Block 15:22 Debug PowerShell Module Function 19:05 Fix Bug in PowerShell Function 23:20 Run Final Successful Test

Using Visual Studio Code as your Default PowerShell Editor

Debug PowerShell with and without VS Code

Introduction to Pester - Jakub Jareš (@nohwnd)

Handling Errors in PowerShell with Try..Catch..Finally

PowerShell Master Class - Advanced Scripting Techniques

Write Unit Tests in Rust 🦀 Rust Programming Tutorial for Developers

Using Visual Studio Code as Your Default PowerShell Editor by Tyler Leonhardt

Don't do that, do this instead: PowerShell worst practices and how to solve them by Chris Gardner

PowerShell 7 Overview

Test-Driven Development with Pester (June Blender)

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Microsoft PowerShell for Beginners - Video 1 Learn PowerShell

Optimizing Visual Studio Code for PowerShell, 2023 Edition by Justin Grote

PowerShell 7 Tutorials for Beginners #11 : Modules

Debugging PowerShell Scripts in Visual Studio Code

PowerShell Module 5: Creating Custom PowerShell Modules

PowerShell Unplugged with Jeffrey Snover (The Blueprint Files) | BRK260

PowerShell: Creating a User Interface Lesson 1 - Quick & Easy

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

