microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 283 forks source link

VS Code Debugger Stuck in Infinite Loading with Breakpoints Enabled on Vite React JSX Project #2125

Closed Miderson99 closed 1 week ago

Miderson99 commented 1 week ago

Description: I'm experiencing an issue in Visual Studio Code (VS Code) where, upon reloading the debugger or starting it with breakpoints enabled, the browser enters an infinite loading state. This behavior prevents me from proceeding with development and debugging on my Vite React JSX project. Notably, if I disable all breakpoints, the debugger loads and runs as expected.

Steps to Reproduce:

Open a Vite React JSX project in VS Code. Set breakpoints in the code. Start debugging or reload the debugger. Observe that the associated browser enters an infinite loading state when breakpoints are enabled. Expected Behavior: The browser should load the application correctly, allowing for debugging with the defined breakpoints.

Observed Behavior: The browser remains in an infinite loading state with breakpoints enabled. However, when breakpoints are disabled, the debugger functions normally, and the application loads without issues.

Troubleshooting Steps Taken:

Checked the launch.json debug configuration. Disabled and re-enabled breakpoints. Updated all debugging-related extensions. Cleared the browser cache. Verified for potential port conflicts. Reinstalled VS Code. Changed the browser from Edge to Chrome for debugging. Despite these attempts, the issue persists when breakpoints are enabled.

Additional Information:

VS Code Version: [1.91.2] Operating System: [Windows 11] Installed Extensions: Bookmarks by Alessandro Fragnani Color Highlight by Sergii N Color Picker by anseki Microsoft Edge Tools for VS Code by Microsoft Prettier - Code Formatter by Prettier React Native Tools (Preview) by Microsoft Tailwind CSS IntelliSense by Tailwind Labs

Miderson99 commented 1 week ago

https://github.com/user-attachments/assets/e18c92f5-e64b-4173-ad9f-e6a6da2cb6a5

connor4312 commented 1 week ago

Use js-debug-nightly for the fix https://github.com/microsoft/vscode-js-debug/?tab=readme-ov-file#nightly-extension

Miderson99 commented 1 week ago

It worked 🥳 I’m incredibly grateful for your help, it was horrible to debug before.

jpike88 commented 1 week ago

confirmed me and my team all had this problem, the nightly build has fixed it