Skip to content

Conversation

@indiesewell
Copy link

@indiesewell indiesewell commented May 24, 2025

Summary

This PR fixes a Windows 10 specific issue where F5 debugging was being blocked by an unnecessary await in the HMR (Hot Module Replacement) server check.

Problem

On Windows 10, the F5 debugging workflow was experiencing delays due to an awaited axios call when checking if the local development server was running. This caused unnecessary blocking behavior during the debugging process.

Solution

Removed the await keyword from the axios.get() call in the HMR server check, allowing the check to run asynchronously without blocking the debugging workflow.

Changes Made

  • File Modified: src/core/webview/ClineProvider.ts
  • Change: Removed await from axios.get(\http://${localServerUrl}`)` call
  • Impact: Non-blocking HMR server check during F5 debugging

Technical Details

Before

try {
    await axios.get(`http://${localServerUrl}`)
} catch (error) {
    vscode.window.showErrorMessage(t("common:errors.hmr_not_running"))
}

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Removed `await` from `axios.get()` in `ClineProvider.ts` to improve F5 debugging performance on Windows 10 by preventing blocking during HMR server check.
> 
>   - **Behavior**:
>     - Removed `await` from `axios.get()` call in `ClineProvider.ts` to prevent blocking during HMR server check on Windows 10.
>     - Improves F5 debugging performance by allowing asynchronous execution.
>   - **Impact**:
>     - Non-blocking HMR server check during F5 debugging on Windows 10.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=RooCodeInc%2FRoo-Code&utm_source=github&utm_medium=referral)<sup> for 1103930c2cb3a894915dc153b345eea0f4c06ef1. You can [customize](https://app.ellipsis.dev/RooCodeInc/settings/summaries) this summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

🐛 Windows 10 F5 Debug Fix:
- Remove await from axios.get() call in HMR server check
- Prevents blocking behavior during F5 debugging on Windows 10
- Maintains error handling while improving debugging experience

This change specifically addresses F5 debugging issues on Windows 10
where the await was causing unnecessary delays in the development workflow.
// Check if local dev server is running.
try {
await axios.get(`http://${localServerUrl}`)
axios.get(`http://${localServerUrl}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the await means the try/catch will no longer catch errors from axios.get. If you still intend to handle failures (e.g. to show an error or fallback HTML), consider attaching a .catch() block. Otherwise, removing the try/catch block may be clearer.

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 25, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 25, 2025
@indiesewell indiesewell deleted the fix/windows10-f5-debug branch May 25, 2025 03:47
@indiesewell indiesewell restored the fix/windows10-f5-debug branch May 25, 2025 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant