To install this, copy it into the plugins folder with RailDriver.dll, then run it instead of Rail Simulator while you run your plugin. If you run both this and Rail Simulator at the same time, expect strange things to happen. You can download the binary here or browse or download the source here.
Incoming messages, either 'gets' or 'sets', show up in the list box. The list box, by default, automatically scrolls to the latest get or set. You can stop it automatically scrolling by using the View -> Follow new requests menu item.
When the plugin sets a value, it shows up in the list. When the plugin requests a value, that too is logged in the list and the debugger responds (in this version it always responds with 42.0).
Note that queries from plugins about changing of locomotives don't show up in the list. They work the other way: the simulator notifies the DLL of the change of locomotive and that state just sits there until the plugin picks it up. The plugin's request for information never actually reaches the simulator program at all. To simulate a change of locomotive, use the 'send' menu, which lets you simulate a change of locomotive either with or without combined throttle and brake.
More features incoming.