restore reliable debug source navigation for generated external Nx workspaces
Background
Debug behavior in generated external Nx workspaces regressed compared to earlier expected behavior.
Users can hit unstable source navigation in Playwright Inspector or missing/incorrect source resolution during --debug runs.
This is separate from #36 (closed):
-
#36 (closed) is inline-workspace line precision and remains
won't fixin 1.x. - This ticket targets generated external workspaces only.
Problem Statement
For generated external workspaces, nx e2e ... --debug does not consistently provide reliable debug source navigation in Playwright Inspector.
Scope
- Reproduce and fix generated-workspace debug source navigation behavior.
- Keep compatibility for supported Nx range (
>=20 <23). - Preserve existing runtime behavior for non-debug executions.
- Keep fix minimal (no 2.x architecture redesign).
Out of Scope
- Perfect line precision guarantee for all inline-workspace debug scenarios (#36 (closed) stays closed).
- Playwright UI mode and parallel execution architecture changes.
- Migration to playwright-bdd (tracked in 2.x tickets).
Reproduction Baseline
- Create external workspace.
- Install plugin and generate Playwright e2e project.
- Run
npx nx run <generated-e2e>:e2e --debug --skipTestRunnerInstall. - Verify source navigation reliability in inspector.
Acceptance Criteria
- Repro is documented with deterministic steps.
- Generated workspace debug source navigation is stable in validated baseline runs.
- CI E2E coverage exists for generated-workspace sync/debug preconditions.
- Nx version matrix impact is checked (20 / previous / latest / next lanes).
- No regression in standard non-debug e2e runs.
- Release notes/changelog entry added for 1.x patch release.
Deliverables
- Code change(s) in runtime/generator path.
- Updated E2E scenario(s) validating generated-workspace sync/debug path.
- Short troubleshooting note for users if any residual limitations remain.
Test Plan
npx nx e2e nx-cucumber-e2e --name "execute invalid base url project with TypeScript stacktrace mapping" --skip-nx-cachenpx nx e2e nx-cucumber-e2e --name "generated project can be synchronized with Nx sync" --skip-nx-cache- Manual validation in generated external workspace with
--debug.
Definition of Done
Generated external workspace debug flow is reliable enough for routine maintenance/debug usage and documented with clear boundaries.