3

I am just getting started with using VSCode to work on an apex class. As I do not want to touch the sandbox I got the code from originally, is there a quick way to see what org I am connected to at any one time, or which org's code I am currently browsing after creating a package.xml and retrieving its source?

1
  • both the answers below are great, and I think could be fitting answers to my question. Awais's answer is more specific to vscode, but Oleksandr's would be more useful in general, thanks so much both!
    – alejandro
    Sep 8 at 13:20
7

yes, you can run a command in terminal sfdx force:org:list

The default org for a project will be marked as (U), default dev hub and scratch org will be marked as (D)

4

when you authorize your org from vs Code, you assign an alias to it, this alias would be shown in vs code at all times like the highlighted one in the below screenshot. This would at all times show the org you are connected to.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.