Technically, Write-Debug acts as a sort of permanent, manually inserted breakpoint in your script. When the shell hits Write-Debug, it pauses your script and lets you investigate things. PowerShell also supports a more dynamic form of breakpoint, called a PSBreakpoint.
You create a PSBreakpoint by running Set-PSBreakpoint. Using parameters of that command, you tell PowerShell what script the breakpoint goes with (it’s based on the path and filename, so the breakpoint will only work so long as the script stays in the same spot) and what you want the breakpoint to trigger on. Your choices include the following: