public async Task RpcExecutionCallback(IJsonRpcClient client, bool expectingException) { // Obtain an execution trace from our client. var executionTrace = await client.GetExecutionTrace(); var executionTraceAnalysis = new ExecutionTraceAnalysis(executionTrace); // Process our execution trace in the debug adapter. await DebugAdapter.ProcessExecutionTraceAnalysis(client, executionTraceAnalysis, expectingException); await Task.CompletedTask; }
static async Task <Exception> GetExecutionTraceException(IJsonRpcClient rpcClient, JsonRpcError error) { var executionTrace = await rpcClient.GetExecutionTrace(); var traceAnalysis = new ExecutionTraceAnalysis(executionTrace); // Build our aggregate exception var aggregateException = traceAnalysis.GetAggregateException(error.ToException()); if (aggregateException == null) { throw new Exception("RPC error occurred with tracing enabled but no exceptions could be found in the trace data. Please report this issue.", error.ToException()); } return(aggregateException); }
public virtual Task <ExecutionTrace> GetExecutionTrace() { return(_proxyClient.GetExecutionTrace()); }