

You can also run VS Code from the terminal by typing 'code' after adding it to the path:

Configure IntelliSense for cross-compilingĮdit Visual Studio Code on macOS Installation.You can open Get info on VS Code too, and drag the VS Code icon to the top-left small icon to assign that icon to our new little app.įinally keep the ⌘ command key pressed and drag the app in the Finder toolbar.


Save this application in the Applications folder and then click Get info to change its icon. Then we assign that to the shell variable finderPath and we use that with the open command to tell VS Code to open that folder. Which basically gets the current opened folder absolute path. The first runs osascript (which is a script to run AppleScript) with the following AppleScript tell application "Finder" to get the POSIX path of (target of front window as alias) If you prefer you can use the bundle ID of the app: finderPath= `osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)'` open -n -b "" -args " $finderPath " Search for “Run Shell Script” in the list of actions, and paste these 2 lines: finderPath= `osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)'` open -n -a "Visual Studio Code" -args " $finderPath " What do I do? I typically move to the parent, grab that folder, and drop it into the VS Code icon in the Dock.īut today I invested some time into making this process much easier, with a button in the Finder toolbar: Let’s say I’m in the Finder, I open a folder and I want to open it in VS Code.
