Skip to content

cmd/pprof: select browser for web output more intelligently #10259

@jonhoo

Description

@jonhoo

When asking pprof for output using web, it currently selects browsers using an in-order traversal of the list '"chrome", "google-chrome", "firefox"'. On each platform, it also tries a platform-specific file opener (xdg-open on *nix) if all the list of browsers all fail to execute.

This behavior is non-intuitive, as users' browser preferences are not respect if they have one of those browsers installed, but use another browser by default (this is particularly common for web developers). Instead, only the platform-specific opener should be used, and only in the case where it fails should fallbacks be attempted.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions