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 parameters, 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 --outputdir parameter to specify a different directory.

1sfdx doctor --outputdir diagnostic-files

Use the --command parameter 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.

1sfdx doctor --command "force:org:list --all"

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

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

To create a GitHub issue, use the --createissue parameter, 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!