vm_service 套件提供了一個 Dart 庫,用於與 Dart VM 服務協定通訊,讓開發者能夠檢視和控制正在執行的 Dart 應用程式。它支援跨 Android、iOS、Web、macOS、Windows 和 Linux 等多個平台的即時除錯、效能分析與執行時期內省。該套件使用 WebSocket 連接與 VM 交換結構化資料,對於除錯工具、分析工具與觀測工具至關重要。主要由開發與分析工具使用,而非終端使用者應用程式。
適用情境
除錯 Dart 應用程式
效能分析
執行時檢查
工具整合
即時應用監控
開發環境診斷
主要特色
基於 WebSocket 的通訊
支援所有主要平台
與 Dart DevTools 的整合
即時資料流
結構化 JSON-RPC 協議
可擴充以支援自訂作業
適合對象
Dart 工具開發者
除錯框架
效能分析工具
IDE 結合
開發環境建構工具
使用建議
需要執行啟用服務協議的虛擬機
不適用於生產應用程式
在網路環境中需要適當的安全部署
限於除錯和分析工作流程
依賴於可能變更的 SDK 內部結構
原始 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).