Newer Version Available

This content describes an older version of this product. View Latest

Use the Doctor to Troubleshoot Problems

Quickly gather Salesforce CLI configuration data and run diagnostic tests with the doctor command. Use the command to easily generate informational files that you can attach to GitHub issues or provide to Salesforce Customer Support.

Run without flags, the command first displays basic information, such as whether you're on the latest CLI version. It then writes your configuration and a detailed diagnosis to a JSON file in the current directory. Use the --output-dir flag to specify a different directory.

1sf doctor --output-dir diagnostic-files

Use the --command flag to run a specific command in debug mode; the doctor writes both stdout and stderr to separate *.log files. Encapsulate the command in double quotes.

1sf doctor --command "org list --all"

To run diagnostic tests on a specific plugin, rather than the CLI itself, use the --plugin flag. If the plugin isn't listening to the doctor, then you get a warning and no data.

1sf doctor --plugin @salesforce/plugin-source

To create a GitHub issue, use the --create-issue flag, enter a title at the prompt, and a browser window automatically opens with a partially filled GitHub issue. Enter the remaining information about your specific issue, click Submit new issue, and the Salesforce CLI team is alerted about your issue.

The CLI doctor is in and ready to diagnose all your problems!