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?
2 Answers
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)
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.