For the latest Dart news, visit our new blog at https://medium.com/dartlang .
Three weeks ago , I wrote about the stream_channel package. Two weeks ago , I wrote about the json_rpc_2 package which is built on top of stream_channel . This week I’ll complete the trifecta by writing about the vm_service_client package, which uses json_rpc_2 in turn—and is a really cool package in its own right! One of the lesser-known corners of the Dart VM is its service protocol , but it’s one of its most powerful components. It uses JSON-RPC 2.0 over WebSockets to allow clients to connect to the VM, inspect its internal state, set breakpoints, and all sorts of neat stuff. If you’ve ever used Observatory for debugging or profiling your Dart code, you’ve been using the service protocol under the hood: that’s how the Observatory web app talks to the VM’s internals. Because the protocol is fully documented and based on a standard underlying protocol, it’s possible for anyone to use from their code. And the vm_service_client package makes it downright easy: it provides a Da...