How microsoft/playwright-vscode works
External Components
• Playwright Browser Instances
• Test Files in Workspace
• Trace Viewer UI
• Recording Browser Session
a. Primary Flows:
• VS Code Extension → Playwright Test CLI
• Test Server ↔ Browser Instances
• Extension Host ↔ Test Model
• UI Components ↔ Core Services
b. Secondary Flows:
• Settings Model → Configuration
• Workspace Observer → Test Files
• Debug Integration → Browser Controller
Key Integration Points
a. VS Code Integration
• Test Explorer API
• Debug Protocol
• Terminal API
• Workspace API
b. Playwright Integration
• Test Runner
• Browser Control
• Recording API
• Trace Viewer
Architectural Patterns to Highlight
• Event-based communication (src/upstream/events.ts)
• Reporter pattern (src/oopReporter.ts)
• Transport layer abstraction (src/transport.ts)
Use the following visualization guidelines:
Layer Organization
• Top: UI/Extension Interface
• Middle: Core Services
• Bottom: Playwright Integration