If you want to do it in Finder, you can write an Automator script to do it (it’s easier than it sounds, AND shows you the power of the OS).
-
Launch Automator
-
Create New Document
-
Create a new Quick Action
-
Add the Action…
- Workflow receives current files or folders from Finder.
- Add a new Run Shell Script action to the workflow. (drag the “Run Shell Script” object, highlighted in the screenshot, to the empty window on the right)
-
Configure the Workflow
- Set the Pass Input to be as arguments
- Paste the following in the input box:
open -n -b "com.microsoft.VSCode" --args "$*"
-
Save the action using a name like Open in Visual Studio Code.
You may now right-click on the folder and find your newly created task under Quick Actions.