dart_vm_injector 1.0.0 copy "dart_vm_injector: ^1.0.0" to clipboard
dart_vm_injector: ^1.0.0 copied to clipboard

Ultra-pro Dart package for injecting and evaluating expressions in live Dart VM isolates via VM Service (WebSocket/JSON-RPC), designed for advanced debugging, live inspection, hot-patching, and securi [...]

Changelog #

All notable changes to dart_vm_injector will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


1.0.0 - 2026-05-31 #

Added #

  • VmInjector — Primary class with both one-shot static API and persistent session API.
  • VmInjector.inject() — One-shot expression injection into an Isolate by number.
  • VmInjector.injectMain() — One-shot injection into the auto-detected main Isolate.
  • VmInjector.connect() — Persistent session factory.
  • VmInjector.connectWithConfig() — Full-config session factory.
  • listIsolates() — Enumerate all user (and optionally system) Isolates.
  • evaluateInIsolate() — Evaluate in root-library scope.
  • evaluateInMainIsolate() — Evaluate in auto-detected main Isolate.
  • evaluateInNamedIsolate() — Evaluate using partial name matching.
  • evaluateInFrame() — Evaluate in a specific call-stack frame (requires paused Isolate).
  • watch() — Continuous polling Stream<WatchEvent> for any expression.
  • stdout / stderr — Live text streams from the VM.
  • vmEvents / isolateEvents / debugEvents / gcEvents — Raw VM event streams.
  • listenToStream() — Subscribe to any VM Service stream by ID.
  • getObject() — Deep heap inspection by instance ID.
  • getInstances() — All live instances of a class.
  • pauseIsolate() / resumeIsolate() — Lifecycle control.
  • stats — Per-session VmConnectionStats with latency and counters.
  • VmConnectionConfig — Typed connection configuration with factory helpers.
  • InjectionResult — Rich result type with unwrap(), valueOrElse().
  • IsolateInfo — Detailed Isolate snapshot with isPaused, numberAsInt.
  • WatchEvent — Watch-stream event with poll index and timestamp.
  • VmConnectionStats — Session uptime, injection counts, average latency.
  • Exception hierarchy — VmConnectionException, IsolateNotFoundException, InjectionFailedException, AotModeException, VmTimeoutException.
  • WebSocketHelper — Auto-discovery via /json/info, HTTP→WS conversion, token extraction.
  • StreamListener — Broadcast VM event streams with clean subscription management.
  • ExpressionEvaluator — JIT-aware evaluator with AOT detection and invokeMethod support.
  • IsolateResolver — Multi-strategy Isolate lookup (by number, name, main).
  • ResultParser — Typed InstanceRef → InjectionResult conversion.
  • VmLogger / VmServiceLog — Internal structured logger.
  • Full example suite — basic_inject, list_isolates, watch_variable, listen_stdout, advanced_inspect, and a complete server_example/ (target server + injector client).
  • Test suite — Unit tests for models, exceptions, ResultParser, WebSocketHelper.

Security #

  • Token-based authentication enforced by default.
  • Auto-discovery via HTTP /json/info before falling back to token-less path.
  • AotModeException prevents silent failures on AOT binaries.
  • Comprehensive security documentation in README.md.
0
likes
130
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Ultra-pro Dart package for injecting and evaluating expressions in live Dart VM isolates via VM Service (WebSocket/JSON-RPC), designed for advanced debugging, live inspection, hot-patching, and security research.

Repository (GitHub)
View/report issues

Topics

#dart #vm #debugging #introspection #injection

License

MIT (license)

Dependencies

async, meta, retry, vm_service, web_socket_channel

More

Packages that depend on dart_vm_injector