vs-streamjsonrpc/doc/troubleshooting.md

1023 B

Troubleshooting

Tracing

When investigating failures, you may find StreamJsonRpc's tracing functionality useful.

With the JsonRpc.TraceSource property, you can listen for:

  1. Which server methods are registered
  2. Incoming and outgoing JSON-RPC messages and how they're being handled along the entire pipeline
  3. When listening is started
  4. RPC method invocation failures with full exception callstacks.

The above is just a sample. The full list of events is available on the JsonRpc.TraceEvents enum.

Other issues

Requests failing with ConnectionLostException

Please see our disconnecting documentation.

Hangs after connecting over IPC pipes

When connecting two processes using Windows (named) pipes, be sure to use PipeOptions.Asynchronous when creating those pipes to be used with our JsonRpc class. All our I/O is asynchronous, and without that flag, .NET Framework and .NET Core will hang. See dotnet/corefx#42366.