You, or your AI agent, restyle a button. Somewhere else a card grows by 32 pixels, and nobody notices until a user does.
A code diff cannot show that, and a visual testing service needs tests, baselines and a subscription.
PixelWhy compares your app, not your code. It renders your project before and after your uncommitted changes, marks
every area that looks different, and then answers the question you actually have: which edit caused this?
Why PixelWhy
- Nothing to set up. No test files, no baselines, no account. It compares your working copy with Git.
- Exact lines, not guesses. It re-renders subsets of your edits until the smallest cause is left, then verifies it in both directions.
- Safe by design. Your app runs from a disposable copy of the base commit. Your own files are only read.
- Ready for AI agents. Agents can check their own work through VS Code chat (
#pixelwhy) or any MCP client.
- Private. Everything runs on your machine. No telemetry, no servers.
Quick start
- Install PixelWhy from the Visual Studio Marketplace, or from a
.vsix file with Extensions: Install from VSIX....
- Open a project that is in a Git repository and contains a web app (plain HTML, Vite, Next.js, Astro and more), with dependencies installed.
- Change something visual, or let your agent do it.
- Run PixelWhy: Scan Visual Changes, or click PixelWhy in the status bar.
- Select a pink area and choose Find the line responsible.
Try it in two minutes: copy examples/demo-site somewhere, follow its README, and watch PixelWhy find a card
that grew by accident.
What you get
- Three ways to compare: a draggable Slider, Side by side, and a Changes view with the differing pixels in magenta.
- Changed areas, numbered. Neighbouring differences, such as every line of a shifted block, are grouped into one area.
- The cause, with proof. You get the file, the line and a diff, labelled Confirmed cause, Sufficient cause, Narrowed down or Unstable area.
- One click from there: open the line, revert only those lines (undoable with Ctrl+Z), mark the area as intended, copy a ready-made prompt for your agent, or ask in VS Code chat.
- Pages, sizes and themes. It follows same-origin links, captures desktop and mobile sizes, and can capture light and dark color schemes.
- Calm screenshots. Fixed clock, seeded randomness, no animations, pixels that change by themselves are ignored, and you can hide anything else with a CSS selector.
- Optional automatic scan after your files stop changing, which is handy when an agent is editing.
- Your theme. The report follows your VS Code theme, including high contrast.
Light theme
How it works
- Your edits. Changes since the base ref (
HEAD by default) are split into small edits, called hunks.
- Shadow copy. The base commit is written to
.pixelwhy/work/, through a temporary Git index, and your app starts from there. Installed packages are linked, not reinstalled.
- Before and after. Pages render twice in headless Chrome, Edge or Chromium. Pixels that differ between two identical renders are treated as noise.
- Delta debugging. For the area you pick, PixelWhy applies different subsets of your edits to the shadow copy and re-renders until a minimal set still reproduces the change. It tries whole files first, then edits, then single lines.
- The exact line. The result is checked both ways: the lines alone reproduce the change, and everything except them does not. That is what Confirmed cause means.
The search follows the delta debugging algorithm of Zeller and Hildebrandt (2002), applied to what a page looks like instead of whether a test fails.
Let your AI agent check its work
AI agents often change more than you asked for. PixelWhy gives them a way to see it before they say "done".
VS Code chat (agent mode): PixelWhy adds a tool you can mention as #pixelwhy. The agent can also call it on its own.
Claude Code, Cursor and other MCP clients: run PixelWhy: Connect an AI Agent (MCP), choose your client, and paste the configuration it copies. For Claude Code, that is one command:
claude mcp add pixelwhy -- node "<path shown by the command>"
The agent receives a text report with files, lines and diffs, and small before and after close-ups. See
docs/AGENTS.md for details, the tool schema and tips.
Supported projects
| Project |
How it starts |
Status |
| Plain HTML, CSS and JavaScript |
Built-in static server |
Covered by automated end-to-end tests |
| Any app started by a command |
pixelwhy.startCommand, for example node server.js {port} |
Covered by automated end-to-end tests |
| Vite, SvelteKit |
vite --port <port> --strictPort |
Detected automatically |
| Next.js |
next dev -p <port> (with --webpack on Next.js 16 and later) |
Detected automatically |
| Astro, Nuxt, Remix, React Router, Create React App, Angular |
Their standard dev commands |
Detected automatically |
Other projects with a dev script |
npm run dev |
Best effort |
Framework dev servers are started with their standard commands, which differ between versions and setups. If yours needs
something special, set pixelwhy.startCommand and pixelwhy.appDirectory; monorepos are supported, and workspace packages
resolve to the base version inside the shadow copy.
Requirements
- VS Code 1.100 or later, in a trusted workspace.
- Git, and a project inside a Git repository with at least one commit.
- Google Chrome, Microsoft Edge or Chromium. PixelWhy uses the one you have; it does not download a browser.
- Your project's dependencies installed (for framework projects).
- Node.js 20 or later on your PATH, only if you use the MCP server.
Commands
| Command |
What it does |
| PixelWhy: Scan Visual Changes |
Compares your working copy with the base ref and opens the report. |
| PixelWhy: Open Report |
Shows the latest report. |
| PixelWhy: Cancel Scan |
Stops a running scan or trace. |
| PixelWhy: Find the Line Responsible |
Traces the selected area in the sidebar to its cause (also available as an inline button). |
| PixelWhy: Turn Automatic Scan On or Off |
Turns the automatic scan on or off for this workspace. |
| PixelWhy: Connect an AI Agent (MCP) |
Copies the setup for Claude Code, Cursor or another MCP client. |
| PixelWhy: Stop Server and Clean Up |
Stops the dev server and removes the shadow copy. |
| PixelWhy: Open Settings |
Opens PixelWhy settings. |
| PixelWhy: Show Log |
Shows the log, including dev server output. |
Settings
Settings live under pixelwhy.* in the Settings editor.
| Setting |
Default |
What it does |
pixelwhy.baseRef |
"HEAD" |
Git ref your working copy is compared with, for example HEAD or origin/main. |
pixelwhy.appDirectory |
"" |
Folder of the web app, relative to the repository root. Detected automatically when empty. |
pixelwhy.startCommand |
"" |
Command that starts your app, run inside the shadow copy. Use {port} for the port number. Detected automatically when empty. |
pixelwhy.routes |
["/"] |
Pages to capture. |
pixelwhy.discoverRoutes |
true |
Also capture same-origin pages linked from your routes. |
pixelwhy.maxRoutes |
6 |
Maximum number of pages per scan. |
pixelwhy.viewports |
Desktop and Mobile |
Screen sizes to capture. |
pixelwhy.colorSchemes |
["light"] |
Color schemes to capture. |
pixelwhy.fullPage |
true |
Capture the whole page, not only the first screen. |
pixelwhy.maxPageHeight |
6000 |
Longest page captured, in pixels. |
pixelwhy.threshold |
0.03 |
Color difference needed to count a pixel as changed. 0 is strict. |
pixelwhy.minRegionPixels |
8 |
Smallest number of changed pixels reported as an area. |
pixelwhy.maskSelectors |
[] |
CSS selectors hidden in screenshots, for ads, avatars, or other content that changes on every load. Example: [data-testid=clock]. |
pixelwhy.waitForSelector |
"" |
CSS selector that must be visible before a screenshot is taken. |
pixelwhy.freezeTime |
true |
Give pages a fixed date and time so clocks and dates do not create false changes. |
pixelwhy.storageState |
"" |
Path to a Playwright storage state file (cookies and local storage) for pages behind a login, relative to the repository root. |
pixelwhy.settleDelayMs |
800 |
Wait after changing files, so the dev server can rebuild. |
pixelwhy.serverTimeoutSeconds |
90 |
How long to wait for the dev server to start. |
pixelwhy.browser |
"auto" |
Browser used for screenshots. auto tries Google Chrome, then Microsoft Edge, then Playwright's Chromium. |
pixelwhy.browserExecutablePath |
"" |
Full path to a Chromium-based browser. Overrides the browser setting. |
pixelwhy.copyFiles |
.env, .env.local, .env.development, .env.development.local |
Untracked files your app needs, copied into the shadow copy from the repository root and the app folder. |
pixelwhy.exclude |
test files, lock files, README.md, CHANGELOG.md, .github, .vscode |
Changed files that cannot affect the page and are skipped. |
pixelwhy.maxAttributionRuns |
80 |
Maximum test renders used to trace one changed area to its cause. |
pixelwhy.keepServerMinutes |
15 |
Keep the scan's dev server running for this long, so causes can be traced without rescanning. |
pixelwhy.autoScan |
false |
Scan automatically after files stop changing, for example when an AI agent finishes editing. |
pixelwhy.autoScanDelaySeconds |
20 |
Quiet time after the last file change before an automatic scan starts. |
The default viewports are Desktop (1280 × 800) and Mobile (390 × 844).
Privacy and security
PixelWhy has no telemetry and makes no network requests. Screenshots and reports stay in .pixelwhy/ inside your project, which
ignores itself in Git. PixelWhy starts your project's dev server, exactly like running it yourself, so it is disabled in
untrusted workspaces. Read the privacy policy and the security policy.
Limitations
- It compares uncommitted changes with a base ref. Changes that are already committed need
pixelwhy.baseRef set to an earlier commit or branch.
- Content that changes on every load needs a mask: add its selector to
pixelwhy.maskSelectors.
- Pages behind a login need a Playwright storage state file (
pixelwhy.storageState).
- Changes to installed dependencies are not reproduced: both versions use your current
node_modules.
- Git submodules are not part of the shadow copy.
- Very long pages are cut at
pixelwhy.maxPageHeight.
Troubleshooting
See docs/TROUBLESHOOTING.md. Most problems are fixed by checking PixelWhy: Show Log, which prints every
step and the dev server output.
Contributing
Contributions are welcome. Start with CONTRIBUTING.md and the architecture notes.
Please follow the code of conduct.
License
MIT © 2026 Radwan Almsora. Third-party notices are in THIRD_PARTY_NOTICES.md.
| |