Cypress: Copy Debug Prompt
Introduction The test failed. Of course it did. And now you're in a staring contest with a stack trace that refuses to make sense. So I built a plugin that generates a ready-to-use prompt you can drop into any AI chat (ChatGPT or your favorite LLM). It packs in all the useful context: test steps, environment info, error messages, and stack traces, so the AI actually gets what happened. No digging through logs. No re-explaining your setup. Just click "Copy Debug Prompt", paste it into ChatGPT, and get help that makes sense. How It Works The plugin hooks into Cypress's failure handling. When a test fails, it captures the error message, test title, relevant stack trace, and even the surrounding context, then wraps it all into a clean, AI-friendly prompt. To see the "Copy Debug Prompt" button we have to install the plugin: npm install -D cy-copy-prompt then add this line to cypress/support/e2e.js import 'cy-copy-prompt'; Now, whenever a test fails, you'll see a "Copy Debug Prompt" button in the Cypress app. One click, and your clipboard is loaded with a prompt that's ready to paste into AI chat. Prompt Copied to Clipboard: Then paste it: That's it Inspired by Playwright's "Copy Prompt" feature, this plugin brings the same convenience to Cypress. It's simple, helpful, and open source. Try it out. If you like it, star it, fork it, or suggest a tweak.

Introduction
The test failed. Of course it did. And now you're in a staring contest with a stack trace that refuses to make sense.
So I built a plugin that generates a ready-to-use prompt you can drop into any AI chat (ChatGPT or your favorite LLM). It packs in all the useful context: test steps, environment info, error messages, and stack traces, so the AI actually gets what happened.
No digging through logs. No re-explaining your setup. Just click "Copy Debug Prompt", paste it into ChatGPT, and get help that makes sense.
How It Works
The plugin hooks into Cypress's failure handling. When a test fails, it captures the error message, test title, relevant stack trace, and even the surrounding context, then wraps it all into a clean, AI-friendly prompt.
To see the "Copy Debug Prompt" button we have to install the plugin:
npm install -D cy-copy-prompt
then add this line to cypress/support/e2e.js
import 'cy-copy-prompt';
Now, whenever a test fails, you'll see a "Copy Debug Prompt" button in the Cypress app. One click, and your clipboard is loaded with a prompt that's ready to paste into AI chat.
Prompt Copied to Clipboard:
Then paste it:
That's it
Inspired by Playwright's "Copy Prompt" feature, this plugin brings the same convenience to Cypress. It's simple, helpful, and open source.
Try it out. If you like it, star it, fork it, or suggest a tweak.