-
Launch Automator
-
Create New Document
-
Create a new Quick Action (Select "Quick Action")
-
Add the Action Workflow receives
current files or folders
inFinder
-
If desired, add custom image/icon (see comment below)
-
Add a new
Run Shell Script
action to the workflow. -
Configure the Workflow
-
Set the
Pass Input
to beas 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
-
If icon does not show, relaunch Finder: hold
cmd
+opt
+right-click
Finder icon > relaunch
Right-click a file or folder, find your newly created task under Quick Actions
Ref: https://stackoverflow.com/questions/64040393/open-a-folder-in-vscode-through-finder-in-macos