grpc-web-devtools
grpc-web-devtools copied to clipboard
Usage ?
Installed extension and in Usage I see this:
const enableDevTools = window.GRPCWEB_DEVTOOLS || (() => {}); const client = new EchoServiceClient('http://myapi.com'); enableDevTools([ client, ]);
I added the snippet code into my own client.js file and changed client to my respective service and endpoint... reloaded the app inside chrome and I don't see anything being displayed in gRPC-Web under inspect window...
I'm confused on how to use this?
Let me know thanks,
@kennydefie Have you been able to use it?
In case anyone meet this problem, here is the solution:
The "EchoServiceClient" in document is an example, actually you need to import the service client from the generated xxxx_grpc_web_pb.js
For example, my client is chatServiceClient, so I write like this:
import { ChatServiceClient } from "./protobuffer/chat_grpc_web_pb";
const client = new ChatServiceClient("http://localhost:8080", null, null);
// for debug
const enableDevTools = window.__GRPCWEB_DEVTOOLS__ || (() => {})
enableDevTools([
client
]);