Skip to content

Conversation

@indiesewell
Copy link

@indiesewell indiesewell commented May 23, 2025

fix: Resolve async issue during F5 debugging

This PR fixes an issue that occurs when debugging the extension using F5, which was preventing the debugger from properly loading the extension.

Changes:

  • Removed the await keyword before axios.get call in ClineProvider.ts
  • This change resolves an async execution issue caused by unnecessary await during initialization
  • Improves performance and stability during extension startup
  • Ensures the extension loads and runs properly in F5 debugging mode

Technical details:
In ClineProvider.ts, axios.get already returns a Promise, so the await keyword is unnecessary. Removing await allows the request to execute asynchronously in the background without blocking the extension's initialization process, thus resolving the loading issue during F5 debugging.


Important

Removes unnecessary await from axios.get in ClineProvider.ts to fix async issue during F5 debugging, improving extension startup performance.

  • Behavior:
    • Removes await from axios.get call in ClineProvider.ts to fix async issue during F5 debugging.
    • Ensures non-blocking extension initialization, improving performance and stability.
  • Technical Details:
    • axios.get already returns a Promise, so await is unnecessary and was causing blocking behavior.

This description was created by Ellipsis for a622b57. You can customize this summary. It will automatically update as commits are pushed.

// 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 await means any error from axios.get() won’t be caught by the try-catch block. If the dev server is down, the error will be unhandled. Consider attaching a .catch handler or otherwise handling promise rejections.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems we're trying to fall back to this.getHtmlContent(webview) if your local server isn't running, but now it won't do that. What happens if your local server isn't running / fails to start? Seems like the webview will be completely broken in that case.

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap May 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 24, 2025
@exilelabs exilelabs deleted the fix/f5-debugging-issue branch May 24, 2025 12:55
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.

2 participants