Adam Smooch
Adam Smooch

Reputation: 1322

MacOS + Visual Studio Code: add a folder to a workspace by path

I'm trying to inspect the code in a module found in a subfolder of /usr/local/lib/python3.9/site-packages/*.

The trouble is that Visual Studio Code only gives me the system finder view, to navigate to the folder, and I'm not quite sure how to get to the root to even find /usr.

Upvotes: 0

Views: 2210

Answers (1)

CRD
CRD

Reputation: 53010

This method should work in any app that uses the standard file dialogs:

  1. In the Finder open a new window
  2. Type Command-Shift-G or select Go to Folder… from the Finder’s Go menu
  3. Enter your path, e.g. /usr/local/lib/python3.9/site-packages
  4. You now have a Finder window showing the (parent) folder of where you want to explore
  5. In VSCode type Command+O or select Open… from the File menu
  6. A standard file dialog will open
  7. Click on a folder icon in your Finder window, this can be an icon in the window itself or the one in the window’s title bar, and drag and drop it onto the standard file dialog.
  8. The dialog will switch to show the dropped folder
  9. Continue navigating as usual

Upvotes: 1

Related Questions