Closed DanTup closed 6 years ago
You can pass an arbitrary StreamChannel
to new VMServiceClient()
, which means you can add logging using things like StreamChannel.changeSink()
and StreamChannel.changeStream()
.
I'll take a look at that; thanks!
Not sure if this is exactly what you had in mind, but seems to do the job - thanks 👍
final StreamChannel<String> channel = new IOWebSocketChannel.connect(uri)
.cast<String>()
.changeStream((Stream<String> stream) => stream.map(debugPrint))
.changeSink((StreamSink<String> sink) =>
new StreamController<String>()
..stream.listen((String s) => sink.add(debugPrint(s))));
vmService = new VMServiceClient(channel);
I'm trying to debug some issues and it'd be useful to see all of the raw JSON messages going back forth to the VM service. I'm looked through the code but can't see any obvious way to do this - is it possible? (if not, is it a reasonable request?)