vm_service_interface 套件提供了一個 Dart 庫,定義了實作 Dart VM 服務協定的合約。它能讓開發人員與 Dart VM 進行通訊,以達成除錯、剖析及監控的目的。此介面對於需要與執行中的 Dart 應用程式互動的工具至關重要,例如除錯器、效能分析器與開發環境。該套件支援所有主要平台,包含行動裝置、Web 與桌面,確保在各環境中都能一致存取 VM 層級的資訊。
適用情境
除錯 Dart 應用程式
效能分析
應用狀態的即時監控
與 IDE 和開發工具的整合
熱重載和熱重新啟動協調
Flutter 應用的遠端除錯
主要特色
標準化虛擬機服務協議介面
跨平台相容性
支援基於 WebSocket 的通訊
類型安全的 API 定義
可擴展的設計,用於自定義擴展
內建的序列化/反序列化支援
適合對象
Dart/Flutter 工具開發人員
IDE 與編輯器外掛程式創作者
除錯與分析工具建構者
CI/CD 流水線整合者
高級Flutter應用監控
使用建議
需要了解 Dart VM 服務協議
不適用於最終使用者應用程式中的直接使用
可能需要額外的相依性才能實現完整功能
除了SDK來源之外,文件有限
最佳搭配 vm_service 套件使用
平台特定的行為在遠端連接期間可能會有所不同
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
Dart
An approachable, portable, and productive language for high-quality apps on any platform
Dart is:
Approachable:
Develop with a strongly typed programming language that is consistent,
concise, and offers modern language features like null safety and patterns.
Portable:
Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend.
Compile to JavaScript or WebAssembly for the web.
Productive:
Make changes iteratively: use hot reload to see the result instantly in your running app.
Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways,
depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more),
Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an
AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time
compiler (dartdevc) and a production time compiler (dart2js).
Browse pub.dev for more packages and libraries contributed
by the community and the Dart team.
Our API reference documentation is published at api.dart.dev,
based on the stable release. (We also publish docs from our
beta and dev channels,
as well as from the primary development branch).