fix(vscode): stop debug startup on Azurite readiness timeout#9147
Open
lambrianmsft wants to merge 5 commits into
Open
fix(vscode): stop debug startup on Azurite readiness timeout#9147lambrianmsft wants to merge 5 commits into
lambrianmsft wants to merge 5 commits into
Conversation
…o verify AzureWebJobsStorage connection
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Keep as-is. |
| Commit Type | ✅ | Correct (fix). |
| Risk Level | ✅ | Medium is appropriate. |
| What & Why | ✅ | Good concise explanation. |
| Impact of Change | ✅ | Good; optionally add user-visible message example. |
| Test Plan | ✅ | Tests added/updated — ensure CI wiring for E2E. |
| Contributors | Consider listing human reviewers/owners. | |
| Screenshots/Videos | ✅ | Present and adequate. |
Final message
This PR passes the PR title & body validation. The advised risk level (risk:medium) matches the submitter's selection and the repository label. The PR follows the required template, includes unit + E2E tests, and the code diff implements the described behavior.
Suggested small improvements before merging:
- Confirm CI runs the new Phase 4.9 E2E mode in the appropriate pipeline (or document why it should remain out of CI). The E2E additions are large and may be flaky on some CI agents; consider gating or adding retries if needed.
- Optionally add a quick example of the user-visible Azurite timeout message to the Impact or What & Why section for easier triage by support.
- (Optional) Add human contributor names to the Contributors section if others helped with design/review.
Please update if you want me to re-check any of the suggested optional items or verify that the new E2E phase is wired into CI.
Last updated: Wed, 13 May 2026 23:15:51 GMT
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a VS Code debugging race condition where Azurite is auto-started but the debug session proceeds before the storage emulator is actually reachable, leading to intermittent AzureWebJobsStorage connection failures.
Changes:
- Add a post-start “wait until Azurite is ready” retry loop before continuing.
- Update pre-debug validation to (a) block debug when
AzureWebJobsStorageis missing and (b) suppress “Debug anyway” when Azurite was supposed to be auto-started. - Add unit tests covering the new Azurite-wait and pre-debug behaviors; ensure Azurite start command is awaited.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/vs-code-designer/src/app/utils/azurite/activateAzurite.ts | Adds retry-based readiness wait after starting Azurite and updates telemetry. |
| apps/vs-code-designer/src/app/utils/azurite/test/activateAzurite.test.ts | Adds a unit test asserting Azurite readiness polling after auto-start. |
| apps/vs-code-designer/src/app/debug/validatePreDebug.ts | Adds missing-AzureWebJobsStorage blocking and new options for emulator validation (incl. disabling “Debug anyway”). |
| apps/vs-code-designer/src/app/debug/test/validatePreDebug.test.ts | Adds unit tests for missing storage, and “Debug anyway” behavior when auto-start is enabled/disabled. |
| apps/vs-code-designer/src/app/azuriteExtension/executeOnAzuriteExt.ts | Awaits the Azurite command execution (but needs a small fix to arg forwarding). |
Comment on lines
15
to
17
| await vscode.commands.executeCommand(command, { | ||
| ...args, | ||
| }); |
Comment on lines
+108
to
+117
| for (let attempt = 1; attempt <= azuriteStartupRetryCount; attempt++) { | ||
| context.telemetry.properties.azuriteStartupAttempt = attempt.toString(); | ||
| if (await validateEmulatorIsRunning(context, projectPath, false)) { | ||
| context.telemetry.properties.azuriteReady = 'true'; | ||
| return; | ||
| } | ||
|
|
||
| if (attempt < azuriteStartupRetryCount) { | ||
| await delay(azuriteStartupRetryDelayMs); | ||
| } |
Comment on lines
+124
to
+125
| 'Azurite did not become ready within "{0}" seconds. Make sure the Azurite extension is installed and running, then try debugging again.', | ||
| (azuriteStartupRetryCount * azuriteStartupRetryDelayMs) / 1000 |
This was referenced May 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserves Azurite startup failure handling while incorporating Azure main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates AI instructions from docs/ai-setup after the Azurite E2E guidance update. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Runs the Azurite regression before workspace conversion phases and bounds the create-workspace step to prevent full-suite CI cancellation on VS Code hangs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Type
Risk Level
Medium risk because this changes the VS Code debug/runtime startup path, Azurite extension activation handling, telemetry/error propagation, and the E2E runner coverage for the regression.
What & Why
This change ensures the Azurite extension is activated and Azurite is reachable before Logic Apps debug/runtime startup continues. If automatic Azurite startup fails or times out, startup now stops with the Azurite readiness error instead of continuing into
AzureWebJobsStoragevalidation and showing the misleading storage-emulator prompt. The fix preserves the original startup error through telemetry wrappers, distinguishes missing/inactive Azurite extension states, and adds unit plus VS Code E2E coverage for the regression.The screenshot below shows the confusing failure users could hit when Azurite was still starting or unavailable but debug continued into storage validation:

Impact of Change
AzureWebJobsStoragewarning orDebug anywaypath.executeOnAzuriteExt,activateAzurite,pickFuncProcess,startRuntimeApi, andvalidatePreDebugerror propagation. The VS Code E2E runner now has a Phase 4.9azuriteonlypath with a fake Azurite extension for failure coverage.AZURITE_E2E_STEP/AZURITE_E2E_WORKSPACE_PARENTto split workspace creation from the debug assertion.Test Plan
E2E_MODE=azuriteonly,E2E_MODE=nonlogicappstartup, andE2E_MODE=conversioncreateonlyLocal validation included targeted Azurite unit coverage,
pnpm run build:extension,npx tsup --config tsup.e2e.test.config.ts, and the new Azurite E2E create/assert flow. The Azurite E2E creates a real workspace through the Create Workspace webview, reopens the generated.code-workspacein a fresh VS Code session, installs a fake Azurite extension that does not start the emulator, blocks Azurite ports, and asserts the Azurite timeout appears while theAzureWebJobsStoragewarning andDebug anywaydo not.Contributors
AI-assisted implementation, validation, and review orchestration with GitHub Copilot.
Screenshots/Videos
No visual UI changes. The screenshot above documents the previous misleading error state.