Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      This week in AI updates: Mistral’s new Le Chat features, ChatGPT updates, and more (September 5, 2025)

      September 6, 2025

      Designing For TV: Principles, Patterns And Practical Guidance (Part 2)

      September 5, 2025

      Neo4j introduces new graph architecture that allows operational and analytics workloads to be run together

      September 5, 2025

      Beyond the benchmarks: Understanding the coding personalities of different LLMs

      September 5, 2025

      Hitachi Energy Pledges $1B to Strengthen US Grid, Build Largest Transformer Plant in Virginia

      September 5, 2025

      How to debug a web app with Playwright MCP and GitHub Copilot

      September 5, 2025

      Between Strategy and Story: Thierry Chopain’s Creative Path

      September 5, 2025

      What You Need to Know About CSS Color Interpolation

      September 5, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Why browsers throttle JavaScript timers (and what to do about it)

      September 6, 2025
      Recent

      Why browsers throttle JavaScript timers (and what to do about it)

      September 6, 2025

      How to create Google Gemini AI component in Total.js Flow

      September 6, 2025

      Drupal 11’s AI Features: What They Actually Mean for Your Team

      September 5, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Harnessing GitOps on Linux for Seamless, Git-First Infrastructure Management

      September 6, 2025
      Recent

      Harnessing GitOps on Linux for Seamless, Git-First Infrastructure Management

      September 6, 2025

      How DevOps Teams Are Redefining Reliability with NixOS and OSTree-Powered Linux

      September 5, 2025

      Distribution Release: Linux Mint 22.2

      September 4, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»How to debug a web app with Playwright MCP and GitHub Copilot

    How to debug a web app with Playwright MCP and GitHub Copilot

    September 5, 2025

    I know it can feel like a unicorn, but most bug reports do, in fact, contain steps to reproduce the error (or repro steps). As wonderful as it is to have those, the process of walking through and validating everything is still tedious. In a perfect world, we’d have end-to-end or acceptance tests that could automate the process. Sadly, many projects lack robust testing.

    Fortunately, GitHub Copilot with the help of the Playwright Model Context Protocol (MCP) server can automate that entire process.

    Let’s explore how we pass the repro steps to Copilot agent mode, and let it use the Playwright MCP server to walk through them and validate the bug. In turn, it will track down and resolve the error.

    What are Playwright and MCP? A quick overview 

    Playwright is an end-to-end testing framework for web apps. You can use it to create scripts to act as a user, validate your application’s feature set, and assure quality.

    For example, if you were building a shopping app, you could create a series of scripts to walk through the entire flow of searching for a product, adding it to the cart, and completing the purchase. These scripts are automated, allowing you to validate the process within seconds.

    Originally developed by Anthropic, MCP is an open (and open source) protocol for exposing tools to AI agents. These tools could include providing additional context and information, or to allow the AI agent to perform actions.

    Bringing this together: there’s a Playwright MCP server, which provides tools from Playwright to AI agents (or GitHub Copilot in this case), to both create those scripts and perform the actions directly. This allows Copilot to actually walk through the repro steps for us!

    How to configure Playwright MCP server for GitHub Copilot in VS Code

    For you to use the Playwright MCP server, it needs to be available in your IDE. In VS Code, you can install the Playwright MCP server to make it available to all projects, or create a file in your .vscode folder tiled mcp.json and add the following:

    {
      "servers": {
        "playwright": {
          "command": "npx",
          "args": [
            "@playwright/mcp@latest"
          ]
        }
      }
    }

    Once you do that, you’ll notice a small play button appear just over playwright in the file. When you select that button, it’ll start the server so you can use it with Copilot agent mode! (Get the guide to using agent mode in Copilot.)

    A screenshot showing the play button below "servers", just above "playwright", in a VS Code window.

    You’ll likely need to configure Playwright, especially if you have a complex startup process for your website. My project is based on the website in the Agents in SDLC workshop (available on GitHub samples), and already has a frontend written with Astro & Svelte, and a backend using Flask. This configuration allowed Playwright to properly start the app. Also, fun fact: The config file was actually created by Copilot!

    I used this prompt with Copilot agent mode to do it, and you can modify it for your particular requirements:

    Add Playwright to this project. When configuring Playwright, note the startup script for the site. Ensure the configuration uses this startup script, and reuses the server if one is already launched.

    The scenario

    Let’s say we have a crowdfunding website for DevOps-themed board games (a truly booming industry). Filters are available to the user to search by publisher and category. After discovering the publisher filter doesn’t work, a user files the following issue on GitHub:

    ## Error
    
    The publisher filter doesn't actually filter the games by publisher.
    
    ## Repro steps
    
    1. Go to the homepage.
    2. Select a publisher from the dropdown list; the page updates.
    3. Review the updated list, noting no change in the games listed.
    
    ## Expected behavior
    
    The only games displayed are ones published by the selected publisher.
    
    ## Actual behavior
    
    All games are still displayed.

    How Copilot agent mode automates bug reproduction with Playwright

    Copilot agent mode is built to be a peer programmer, which means we can give it tasks and then review its work. In other words, we can describe what we’re looking at, the problems we need to solve, what we expect Copilot to do and let Copilot take it from there!

    If you’re following along in the video, you’ll notice I paraphrased the user’s reported issue in my own words. This is something I often do because it allows me to better understand the ask and to go back to the original filer for additional clarity. 

    In practice, I ended up sending the following prompt to Copilot agent mode:

    A user is reporting the publisher filter doesn't do anything. Can you please use Playwright to confirm this is an issue, and if so track it down? Start by going to the landing page, using the dropdown for publisher, and seeing what happens. Thanks!
    💡 Pro tip: If you want to be fancy, you can also incorporate the GitHub MCP server into the flow by asking Copilot to track down the issue and to read the text directly. To streamline this blog, I’m going to stick to just the Playwright MCP server (but you can learn more about the GitHub MCP server and how to use it in our guide).

    From there, Copilot got to work. It utilized the Playwright MCP server to start the website and perform the repro steps. It then confirmed the user’s report: The publisher filter didn’t do anything.

    With this knowledge, Copilot explored the project to track down the bug. It looked at the frontend code, which looked good. With the help of the Playwright MCP server, it also validated the calls to the API were taking place. Then it looked at the backend and discovered the (admittedly) simple problem: a typo.

    What I really appreciated: After proposing a fix, it returned to Playwright to validate that the fix would actually work.

    After this was done, I knew Copilot confirmed the bug, generated a fix, and demonstrated the fix resolved the bug. From there, I turned my attention to reviewing the code, running additional tests, and finally creating my pull request.  

    Why you should use Playwright MCP with GitHub Copilot for web app debugging

    Now yes, the bug itself was straightforward because I wanted to keep the demo focused on Copilot agent mode and Playwright. From experience I can confirm Copilot is invaluable with more complex bugs (I’m speaking from experience).

    Here’s why all this matters: Providing Copilot agent mode with the ability to use Playwright allows it to “see” the impact its changes have on the website, and generally interact with your website, too. You can quickly configure Playwright for your project with the help of Copilot to take advantage of this functionality. And you can even take the next step by incorporating Playwright end-to-end tests into your project if you haven’t already done so. 

    Read the Docs to start using agent mode in GitHub Copilot >

    The post How to debug a web app with Playwright MCP and GitHub Copilot appeared first on The GitHub Blog.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleBetween Strategy and Story: Thierry Chopain’s Creative Path
    Next Article Hitachi Energy Pledges $1B to Strengthen US Grid, Build Largest Transformer Plant in Virginia

    Related Posts

    News & Updates

    Hitachi Energy Pledges $1B to Strengthen US Grid, Build Largest Transformer Plant in Virginia

    September 5, 2025
    News & Updates

    Between Strategy and Story: Thierry Chopain’s Creative Path

    September 5, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-4647 – Centreon Web Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-22252 – Fortinet FortiProxy Authentication Bypass Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    I flew Insta360’s new ‘Antigravity’ drone around Los Angeles, and it was impossible to miss a shot

    News & Updates

    CVE-2025-40572 – Siemens SCALANCE LPE9403 Privilege Escalation

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    News & Updates

    US agency overseeing nuclear weapons breached in Microsoft SharePoint attack

    July 23, 2025

    Microsoft SharePoint zero-day flaws were exploited to breach over 50 organizations, including the National Nuclear…

    CVE-2025-46661 – IPW Systems Metazo Server-Side Template-Injection Vulnerability

    April 28, 2025

    Diablo 4 gives you the chance to win a Mother’s Day candle and express your love (or hatred) with “Mother’s Judgement”

    May 10, 2025

    CVE-2025-49194 – Apache Server Plaintext Authentication Exposure

    June 12, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.