vm_service
15.4.0, released 5 weeks ago by tools.dart.dev
A library to communicate with a service implementing the Dart VM service protocol.
WASM-readyRock solid
What it does
Provides a Dart client library to communicate with the Dart VM service protocol. It allows developers to interact with running Dart and Flutter virtual machines for debugging and inspection purposes.
AI-written summary of version 15.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building debugging tools or developer extensions for Dart and Flutter
- Interacting directly with the Dart VM service protocol programmatically
Skip it when
- Building standard application features unrelated to debugging or VM inspection
Strengths
- Official library for communicating with the Dart VM service
- Kept up-to-date with Dart VM service protocol specifications
Weaknesses
- Low-level protocol client which requires deep understanding of the Dart VM service spec
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:vm_service/vm_service.dart';
import 'package:vm_service/vm_service_io.dart';
Future<void> main() async {
final service = await vmServiceConnectUri('ws://127.0.0.1:1234/ws');
print('Connected to VM');
}Works with
Packages commonly used together with vm_service: ones it builds on, ones built on it, and its own family.
- vm_snapshot_analysisSame familyTools for analyzing the size and contents of Dart VM AOT snapshots.
- coverageBuilt on vm_serviceCollects, manipulates, and formats code coverage data in Dart
- leak_trackerBuilt on vm_serviceFramework to detect memory leaks in Dart and Flutter applications
- devtools_sharedBuilt on vm_serviceShared Dart structures and server classes between devtools_app and other tools.
- ddsBuilt on vm_serviceLibrary to spawn and communicate with the Dart Developer Service (DDS) via HTTP, WebSocket, or SSE.
- dds_service_extensionsBuilt on vm_serviceExtension methods for package:vm_service to make requests to a Dart Development Service instance.
- dwdsBuilt on vm_serviceProxies between the Chrome debug protocol and the Dart VM service protocol.
- hotreloaderBuilt on vm_serviceAutomatic hot code reloader for Dart projects that applies file changes to the running process.