diagnostics icon indicating copy to clipboard operation
diagnostics copied to clipboard

dotnet-dump command line UX for displaying help could be improved

Open MichaelSimons opened this issue 5 years ago • 2 comments

Description

The UX around retrieving the command line help isn't documented and could be improved.

Examples using (version '3.1.141901')

  1. Running dotnet-dump doesn't give any indication that help can be retrieved for the subcommands.
# dotnet-dump
Required command was not provided.

Usage:
  dotnet-dump [options] [command]

Options:
  --version    Display version information

Commands:
  collect                Capture dumps from a process
  analyze <dump_path>    Starts an interactive shell with debugging commands to explore a dump
  ps                     Lists the dotnet processes that dumps can be collected

# dotnet-dump -h
Usage:
  dotnet-dump [options] [command]

Options:
  --version    Display version information

Commands:
  collect                Capture dumps from a process
  analyze <dump_path>    Starts an interactive shell with debugging commands to explore a dump
  ps                     Lists the dotnet processes that dumps can be collected

I would expect -h|--help to be listed as a supported option. More importantly I would expect there would be an indication of how to retrieve additional help for each of the commands. The options parser doesn't appear to support this format -dotnet-docker -h ps so I would suggest displaying a message for how to retrieve the command help such as Run 'dotnet-dump [Command] --help' for more information on a command.

  1. Top level help documentation for analyze is incomplete.
# dotnet-dump -h
Usage:
  dotnet-dump [options] [command]

Options:
  --version    Display version information

Commands:
  collect                Capture dumps from a process
  analyze <dump_path>    Starts an interactive shell with debugging commands to explore a dump
  ps                     Lists the dotnet processes that dumps can be collected

Showing <dump_path> here for the analyze command is strange to me because it feels incomplete because there are other supports args. This is inconsistent with the .NET cli. My suggestion is to just list the commands in the top level help. Require the users to display the analyze help and show them the full cmd syntax.

MichaelSimons avatar Oct 15 '20 21:10 MichaelSimons