Skip to content

Support debug/flutter adapter, update Zed dependencies #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Dixzz
Copy link

@Dixzz Dixzz commented Jun 20, 2025

🧩 Summary

This PR integrates Dart Debug Adapter Protocol (DAP) support into zed-extensions/dart, allowing interactive debugging sessions directly within Zed via dart debug_adapter

IMPORTANT

Make sure you have: in project path .zed/debug.json

[
  {
    "label": "Debug Flutter App",
    "adapter": "dart", // DO NOT EDIT
    "type": "flutter",
    "program": "lib/main.dart",
    "args": ["--web-port=9090"]
  }
]

Steps shown:

  1. Launch Debug Flutter App task in Zed using F4 or command pallet debugger: start
  2. Hit breakpoint at main.dart
  3. Inspect variable frames
  4. Step through code

📸 Screenshots

Description Image
Debug session launched screenshot1

All supported schema for .zed/debug.json config

{
    "adapter": {
      "type": "string",
      "enum": ["dart"]
    },
    "type": {
      "type": "string",
      "enum": ["dart", "flutter"],
      "description": "Debug Flutter or Dart file"
    },
    "label": {
      "type": "string",
      "description": "Human-readable name for this debug configuration",
      "examples": ["Launch Dart App", "Debug Main", "Dart Console"]
    },
    "program": {
      "type": "string",
      "description": "Path to the Dart file to debug",
      "examples": ["lib/main.dart", "bin/main.dart", "test/example_test.dart"]
    },
    "args": {
      "type": "array",
      "description": "Arguments passed to the Dart program.",
      "items": {
        "type": "string"
      },
      "default": []
    },
    "device_id": {
      "type": "string",
      "examples": ["chrome", "edge", "<android-id>", "<ios-id>"]
    },
    "platform": {
      "type": "string",
      "examples": ["web", "desktop"]
    },
    "stopOnEntry": {
      "type": "boolean",
      "description": "Pause debugger on entry.",
      "default": false
    }
  }

This comment was marked as resolved.

@Dixzz

This comment was marked as resolved.

@cla-bot cla-bot bot added the cla-signed label Jun 20, 2025

This comment was marked as resolved.

@Dixzz
Copy link
Author

Dixzz commented Jun 20, 2025

Tested on:
Zed Preview: v0.192.3-pre
Flutter Version: Flutter 3.29.3

@Dixzz Dixzz mentioned this pull request Jun 21, 2025
@maxdeviant maxdeviant changed the title support debug/flutter adapter, update zed deps Support debug/flutter adapter, update Zed dependencies Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant