pprof icon indicating copy to clipboard operation
pprof copied to clipboard

Chrome/Chromium no longer allows access to local files

Open chewxy opened this issue 4 years ago • 2 comments

This leaves a very annoying process where one does something like weblist funcname and then get greeted with something that looks like this:

image

The only workaround is to launch Chrome/Chromium with the -disable-web-security flag. This is clearly not ideal for someone who wants to use the browser as you know, a web browser.

So right now, when I do web or weblist XXX, pprof opens Chromium, which I then have to copy the URL and open it in Firefox. That's awfully annoying.

p/s: I have read the comments arguing for the rationale of putting xdg-open last, but anyone sane in 2021 would have their SVGs open in browsers by default anyway.

chewxy avatar Feb 02 '21 00:02 chewxy

I'm somewhat hesitant to change the order of browsers in this list, this can have unexpected effect to some users. I think you should be able to use the BROWSER environment variable to set your browser of choice.

aalexand avatar Feb 02 '21 00:02 aalexand

yeah I've been using that as a workaround. But it's still a pretty user hostile experience, as well as polluting of the environment variables, which does affect performance and performance optimization (it's inconsequential when you're running go tool pprof but on other programs, having an additional environmental variable DOES actually affect measurement of performance. So you'd have to run BROWSER=firefox go tool pprof XXX instead of polluting the global environment variables by means of export BROWSER=firefox)

chewxy avatar Feb 02 '21 01:02 chewxy