2 tips for working with Web Project Folders, CMD Window and Visual Studio Code

With modern web development I find I’m using Visual Studio code as my IDE the majority of the time. During a recent developer bootcamp I shared the way I open projects and realised that some of the techniques I use wasn’t common knowledge.

With web project in Visual Studio Code (VSCode) you need to open the folder at the root of the project rather than a specific file (for Visual Studio Microsoft Developers there is no equivalent to the *.sln or *.csproj file to open). Most of the developer tooling automation is accomplished by entering commands at a command line (such as building, launching local debug server, linting, git commands etc). So for me I go through this routine when I’m opening an existing project to work on.

  1. Use Windows Explorer to navigate to the root folder of the project
  2. Place cursor in the ‘breadcrumb’ area at the top of the Windows Explorer window and type CMD
  3. This opens a new Windows Command Line window with the current directory set to the project folder you’ve got open in Window Explorer (that’s the first tip)
  4. At the command line type code . (that’s code<space>.) This starts Visual Studio Code and opens the project folder (that’s the second tip)
Click for larger image

Now I’m left with VSCode started with the correct project folder open, I’ve got a command line window open to the project folder to run any automation commands, and I’ve got Windows Explorer open to the project folder to do any file level manipulation.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: