Breakpoint

noun

say it: “BRAYK-poynt” /ˈbreɪkˌpɔɪnt/

A mark on a line of code that makes the program pause there, so you can look at its values before the line runs.

What is a breakpoint in PowerShell?

A breakpoint is a mark on a line that pauses a script before that line runs, like pausing a movie to see what's in the frame. In VS Code it's the red dot beside the line number (F9); at the prompt, Set-PSBreakpoint sets one.

Set-PSBreakpoint -Script .\move-receipts.ps1 -Line 9
.\move-receipts.ps1
# Hit Line breakpoint on 'C:\Users\Sam\terminal-practice\mover\move-receipts.ps1:9'
$to
# C:\Users\Sam\terminal-practice\mover\backup-drive\2026-10-03-groceries.pdf

In a sentence

  • “With a breakpoint on the if line, you can see what $to holds for each receipt.”
  • “Sam clicked beside line 9 to put a breakpoint there, and the mover paused before it.”

Level: Apprentice · More PowerShell terms at this level

Updated

In other subjects