Skip to content

How to determine which Vercel Deployment introduced an issue?

The great benefit of the Vercel platform is that with preview deployments if an issue is introduced you can check a past version of your project to find the last working version. With the following guide you will be able to quickly find the broken deployment by using the tool Vercel Bisect:

vercel bisect

Vercel CLI command to search for first bad deployment

Use Vercel Bisect to find first broken deployment

Vercel Bisect is a command, inspired by the git bisect command, that helps identify the first Deployment an issue was introduced by traversing a range of preview deployments, marking them as either "good" or "bad". This tool was released in version 24 of the CLI.

To start your debugging session simply run the terminal command and you will be given an interactive prompt to help find where the bad commit was introduced. Start with a deployment url where the bug occurs. Next, specify a deployment url where the bug does not occur. Lastly, specify a subpath to narrow down by page, such as "/login" or "/".

Vercel Bisect will retrieve a list of deployments set you up to begin reviewing possibly bad deployments in the middle of the list, utilizing the efficiency of a Binary Search. At each step, you’ll indicate if the deployment is “good” or “bad”, to quickly narrow down to the root cause The number of steps left will be visible. After the full list of deployments has been traversed, the first bad deployment will be shown with the date, commit with message, and url to inspect the deployment on the dashboard.

Couldn't find the guide you need?