user1414378
user1414378

Reputation: 39

Using Glimpse in asp.net core RTM web api

I am using ASP.NET Core Web API, and I have installed the beta2 version of Glimpse for profiling. I was able to do services.AddGlimpse and app.UseGlimpse in Startup.cs, but Glimpse HUD is not showing up in the Browser when I am firing the API end points.

Any suggestions on how to fix this issue?

Upvotes: 1

Views: 849

Answers (1)

Shaun Luttin
Shaun Luttin

Reputation: 141622

The Glimpse HUB requires HTML into which to inject itself. Result: the HUB cannot inject itself into an API endpoint that returns plain text or JSON. Instead, we have to use the full Glimpse client. Here is how.

Go to http://localhost:5000 (or to any page that renders the HUB) and click on the "g" link.

enter image description here

That will open the full Glimpse Client in a new tab.

enter image description here

Now, return to your original tab and navigate to an API route (e.g. /api/products).

enter image description here

Return again to the full Glimpse Client to see the analysis of that request.

enter image description here

See: https://github.com/Glimpse/Glimpse.Prototype/issues/132

Upvotes: 1

Related Questions