# HG changeset patch # User wenzelm # Date 1567794211 -7200 # Node ID e56ec28fc5e8e9f3e64a5083a6c64fccf487a8dc # Parent 94442fce40a556d1e33c78b6b3fcea0ceafc2322 optional trace output; diff -r 94442fce40a5 -r e56ec28fc5e8 src/Pure/PIDE/prover.scala --- a/src/Pure/PIDE/prover.scala Fri Sep 06 19:44:54 2019 +0200 +++ b/src/Pure/PIDE/prover.scala Fri Sep 06 20:23:31 2019 +0200 @@ -341,9 +341,17 @@ /** protocol commands **/ + var trace: Boolean = false + def protocol_command_raw(name: String, args: List[Bytes]): Unit = command_input match { - case Some(thread) if thread.is_active => thread.send(Bytes(name) :: args) + case Some(thread) if thread.is_active => + if (trace) { + val payload = (0 /: args)({ case (n, b) => n + b.length }) + Output.writeln( + "protocol_command " + name + ", args = " + args.length + ", payload = " + payload) + } + thread.send(Bytes(name) :: args) case _ => error("Inactive prover input thread for command " + quote(name)) }