Open connected scratch org from vs code

Open any of  your default scratch org, or another specified org, in a browser from salesforce cli terminal or connected VS code.

Open default org in browser

Open your default org in your default browser.
// open in default browser
sf org open

// open in the specific browser,example Firefox browser
sf org open -b firefox

Open specific org with alias in browser

If your workspace connected more then one salesforce orgs, then you can specific org name (alias) to open that org in browser. 
// for SFDX
sfdx force:org:open -u ScratchOrg1

//for SF cli
sf org open -t MyScratchOrg
Flags:
  • -b/--browser : Browser where the org opens.supported browsers are chrome, edge and firefox.
  • -o/--target-org : Username or alias of the target org. 

Source:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_org_commands_unified.htm#cli_reference_org_open_unified

Labels:
Join the conversation