pbi_launch
Launch Power BI Desktop with CDP debug port for AI agent control. Automatically resolves launcher, injects debug environment, and avoids duplicate instances.
Instructions
Launch Power BI Desktop on a .pbip WITH the CDP debug port. Resolves a launcher in order: PBI_DESKTOP_BRIDGE env → powerbi-desktop on PATH → direct PBIDesktop.exe (reported as launcher: bridge-env|bridge-path|direct). Injects the WebView2 remote-debugging env var into Desktop's own process, spawns detached, waits until the CDP port answers. If the port is already up, reports the running instance instead of launching a second one. Pre-flight warns about orphaned PBIDesktop/msmdsrv. After it returns cdpUp:true, call pbi_wait_for {text:""} — the canvas is still rendering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pbip | Yes | Absolute path to the .pbip file | |
| port | No | CDP port (default 9222) | |
| waitPortMs | No | How long to wait for the CDP port to answer (default 240000) |