
Skill
devflow-connect
diagnose DevFlow agent connectivity issues
Description
Diagnose DevFlow agent connectivity. USE FOR: `maui devflow` connection failures, agent not found, ports, adb forwarding, broker. DO NOT USE FOR: build failures, setup, visual tree, or Blazor CDP.
SKILL.md
DevFlow Connect
Diagnose and resolve connectivity between the maui CLI and running .NET MAUI apps instrumented with the DevFlow agent.
When to Use
maui devflow listshows no agentsmaui devflow treefails with "Cannot connect to agent"- Port conflicts on 9223 or the broker port
- Android emulator connectivity issues (adb port forwarding)
- App is running but DevFlow commands fail
When Not to Use
- Build or deployment failures (use standard build diagnostics)
- Environment setup (use
dotnet-maui-doctorfrom dotnet/skills) - Visual tree queries after connection works
- CDP/Blazor WebView debugging
Optional Session Feedback Nudge
If connectivity recovery required repeated broker/list/wait/status attempts,
Android forwarding detours, direct port fallback, or other workarounds, ask
whether the user wants to run maui-devflow-session-review to summarize friction
for MAUI DevFlow product feedback. Do not run it automatically.
Prerequisites
- The
mauiCLI tool installed (dotnet tool install -g Microsoft.Maui.Cli) - A .NET MAUI app with
Microsoft.Maui.DevFlow.AgentNuGet package added - The app must be running on a target device or emulator
Workflow
1. Verify Agent Integration
Confirm the app has the DevFlow agent NuGet package:
grep -r "Microsoft.Maui.DevFlow.Agent" *.csproj
The agent must be initialized in MauiProgram.cs:
builder.Services.AddMauiDevFlowAgent();
2. Check Broker Status
maui devflow broker status
If the broker is not running, start it:
maui devflow broker start
3. Platform-Specific Connectivity
Android Emulator
Android emulators run in a network namespace. Port forwarding is required:
adb reverse tcp:19223 tcp:19223 # Broker port
adb reverse tcp:9223 tcp:9223 # Agent default port
Verify with:
adb reverse --list
iOS Simulator
No port forwarding needed — simulators share the host network. Verify the app is running:
xcrun simctl list devices booted
Mac Catalyst / macOS
Direct localhost access. Check if the port is in use:
lsof -i :9223
Windows
Direct localhost access. Check firewall rules if connection fails.
Linux (GTK)
Direct localhost access. Verify the app process is running:
pgrep -f "YourApp"
4. List Connected Agents
maui devflow list
Expected output shows agent ID, app name, platform, and port. If empty, the agent in the app is not reaching the broker.
5. Test Connection
maui devflow tree --depth 1
A successful response returns the top-level visual tree. If this fails with a timeout, the agent HTTP server inside the app may not be responding.
6. Common Fixes
| Symptom | Fix |
|---|---|
| No agents listed | Check agent NuGet package + AddMauiDevFlowAgent() call |
| Android: connection refused | Run adb reverse for both ports (19223 + 9223) |
| Port already in use | Kill stale process: lsof -i :9223 then kill <PID> |
| Broker not running | maui devflow broker start |
| App crashes on startup | Check that DevFlow agent version matches MAUI version |
More skills from the maui-labs repository
View all 32 skillsandroid-slim-bindings
create Android slim bindings for .NET
Jul 12.NETAndroidJavaKotlin +1devflow-automation
automate .NET MAUI app state
Jul 12.NETAutomationMAUIMobiledotnet-workload-info
discover MAUI workload metadata
Jul 12C#CLIEngineeringMAUIios-slim-bindings
create iOS slim bindings for MAUI
Jul 12.NETiOSMAUISwift +1maui-accessibility
implement accessibility in .NET MAUI apps
Jul 12.NETAccessibilityMAUIMobile +1maui-ai-debugging
debug .NET MAUI application issues
Jul 12.NETDebuggingMAUIMobile
More from .NET (Microsoft)
View publishermultithreaded-task-migration
migrate MSBuild tasks to multithreaded mode
msbuild
Jul 22.NETEngineeringPerformanceanalyzing-dotnet-performance
analyze .NET code for performance anti-patterns
skills
Jul 12.NETCode AnalysisDebuggingPerformanceandroid-tombstone-symbolication
symbolicate .NET runtime frames in Android tombstones
skills
Jul 12.NETAndroidDebuggingMicrosoftapple-crash-symbolication
symbolicate .NET runtime frames in crash logs
skills
Jul 12.NETDebuggingiOSmacOS +1assertion-quality
evaluate assertion quality in test suites
skills
Jul 12Code AnalysisQATestingauthor-component
create and review Blazor components
skills
Jul 15.NETBlazorC#UI Components +1