Skip to content

DevTools hangs with high CPU usage when a breakpoint is hit while debugging my company's React code. #275

Open
@gzx-miller

Description

Steps to reproduce:

  1. Run my company's React project for debugging: npm run dev
    The service will run, and you can access it at http://localhost:80.

  2. Modify the hosts file to map 127.0.0.1 to xxx.yyy.com.
    You can then access the above service by opening xxx.yyy.com.

  3. In DevTools, locate the code and add any breakpoint that might be triggered. Then, trigger this breakpoint through an operation.
    You will see that the breakpoint is effective.

  4. For the first 1-2 seconds, DevTools is still responsive, but after that, it becomes unresponsive. You can't switch tabs or inspect variables in the call stack. Additionally, you can see that its CPU usage spikes, consuming an entire CPU core. If you resize the DevTools window, the newly exposed part of the window isn't rendered.

  5. If you choose to close DevTools, the program resumes normal operation.

About the Edge version:
This issue did not exist in the initial version 122 of Edge. The problem appeared after I upgraded WebView2 from version 122 to 127.
I consulted with some friends at Microsoft, and they asked if the same issue occurred in Edge. At that time, my Edge version was 122, and I couldn't reproduce the issue. So, I upgraded Edge to version 127, and the problem appeared, just as it did with WebView2 version 127.

About the reproduction rate:
In my code environment, the issue has a high reproduction rate, around 90%.
I tried to reproduce the issue in a simple React project, but I couldn't.
It may require a more complex React project, and it should be running in a React debug service environment.
Unfortunately, I cannot provide my company's code, as it's not allowed to be shared.

Screen from edge devtools:

AB#53420578

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtrackedThis issue is now tracked on our internal backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions