IDEA: Chrome DevTools Extension & Retrieving Current Page JSON result

Hello all,
I had an idea of creating a Chrome DevTools extension to display the results in a new DevTools tab and would love to hear thoughts on this before I dive into it as a pet project.

So the page instead of displaying the collapsed timings on the page top left or top right, would use the exact same JSON & potentially a different UI to display the same information.

So is it possible to get the current page request MiniProfiler JSON result from a public URL endpoint?

Thought is that Chrome DevTools is opened & the MiniProfiler result for the current page in the browser is run/retrieved & we get back a JSON which can be used in a custom UI that fits in with Chrome DevTools.

Look forward to hearing your thoughts on this.

Thanks,
Warren :slight_smile:

Yes, it’s possible. Everytime a request is being profiled, the response is send with custom header named “X-Miniprofiler-Ids”. It’s an array of UUID (ex.: “c6976fa8-d4f0-49e9-a783-5dc62204c46c”]).

You can than send a POST request to /mini-profiler-resources/results with parameters this UUID as the id parameter and popup=1. The popup parameter is used by the server to send the request as in a JSON format.

If you want to play around with this, I’ve published a demo application on heroku using miniprofiler for node.js. Even though it’s using node.js as the backend, everything is same as in .Net. The public URL is http://miniprofiler-demo.herokuapp.com/. Just open Chrome DevTools and take a look at the Requests tab.

Hi Warren,

Any news on your pet project?

How about going this route for Chrome Developer Tools:

https://umaar.com/dev-tips/136-server-timing/

Regards
Paul