debugging-code
Interactive Debugger
Use when a program crashes, produces wrong output, or you need to understand exactly how execution reached a particular state — and running it again with more print statements won't give you the answer fast enough.
You can pause a running program at any point, read live variable values and the call stack at that exact moment, step forward line by line or jump to the next breakpoint, and evaluate arbitrary expressions against the live process — all without restarting.
Setup
This skill uses dap, a CLI tool that background daemon to interact with the debugger via the DAP Protocol, maintain
the debugger state, so you can simply interact with it with multiple calls.
If dap isn't installed (check: command -v dap), install it NOW.
Ask/notify the user before proceeding to install it.
From Homebrew (macOS)