Home
%3CLINGO-SUB%20id%3D%22lingo-sub-663431%22%20slang%3D%22en-US%22%3EHow%20to%20Use%20Cloud%20Shell%20in%20Visual%20Studio%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-663431%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3CDIV%20class%3D%22video-embed-center%20video-embed%22%3E%3CIFRAME%20class%3D%22embedly-embed%22%20src%3D%22https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252F6P7kecGgrjY%253Ffeature%253Doembed%26amp%3Burl%3Dhttp%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253D6P7kecGgrjY%26amp%3Bimage%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252F6P7kecGgrjY%252Fhqdefault.jpg%26amp%3Bkey%3Dfad07bfa4bd747d3bdea27e17b533c0e%26amp%3Btype%3Dtext%252Fhtml%26amp%3Bschema%3Dyoutube%22%20width%3D%22600%22%20height%3D%22337%22%20scrolling%3D%22no%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%22%20allowfullscreen%3D%22true%22%20title%3D%22Video%22%3E%3C%2FIFRAME%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20you%20may%20know%2C%20I%20am%20a%20huge%20fan%20of%20the%20Azure%20Cloud%20Shell.%20I%20use%20it%20often%20directly%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%3FWT.mc_id%3Ditopstalk-blog-thmaure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Portal%3C%2FA%3E%2C%20on%20Microsoft%20Docs%2C%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Ffeatures%2Fazure-portal%2Fmobile-app%3FWT.mc_id%3Ditopstalk-blog-thmaure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Mobile%20App%3C%2FA%3E%20or%20on%20%3CA%20href%3D%22https%3A%2F%2Fshell.azure.com%2F%3FWT.mc_id%3Ditopstalk-blog-thmaure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eshell.azure.com%3C%2FA%3E.%20A%20lot%20of%20times%20I%20am%20editing%20files%20and%20writing%20code%20and%20Azure%20Resource%20Manager%20(ARM)%20templates%20in%20Visual%20Studio%20Code%20and%20in%20that%20case%20I%20need%20to%20either%20use%20a%20local%20%3CA%20href%3D%22https%3A%2F%2Fwww.thomasmaurer.ch%2F2016%2F05%2Fhow-to-install-the-azure-powershell-module%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20PowerShell%3C%2FA%3E%20or%20Azure%20CLI%20installation%20or%20switch%20from%20Visual%20Studio%20Code%20back%20in%20the%20browser%20to%20use%20Cloud%20Shell.%20However%2C%20there%20is%20also%20a%20third%20option%2C%20which%20allows%20me%20to%20run%20Cloud%20Shell%20directly%20within%20%3CA%20href%3D%22https%3A%2F%2Fcode.visualstudio.com%3FWT.mc_id%3Dthomasmaurer-blog-thmaure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%20Code%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20set%20up%20Cloud%20Shell%20in%20Visual%20Studio%20Code%20you%20need%20to%20do%20two%20things.%20First%2C%20you%20need%20to%20install%20nodeJS%20and%20the%20Azure%20Account%20extension.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3EOn%20Windows%3A%20Requires%20Node.js%206%20or%20later%20to%20be%20installed%20(%3C%2FSPAN%3E%3CA%20title%3D%22https%3A%2F%2Fnodejs.org%22%20href%3D%22https%3A%2F%2Fnodejs.org%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fnodejs.org%3C%2FA%3E%3CSPAN%3E).%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EVisual%20Studio%20Code%20%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-vscode.azure-account%3FWT.mc_id%3Ditopstalk-blog-thmaure%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Account%3C%2FA%3E%20extension.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%3ENext%2C%20you%20can%20log%20in%20to%20Azure%20and%20open%20PowerShell%20or%20Bash%20in%20Cloud%20Shell%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20757px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F116910iDC4ED53AF11581E9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Cloud-Shell-in-Visual-Studio-Code.gif%22%20title%3D%22Cloud-Shell-in-Visual-Studio-Code.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EPress%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECTRL%2BSHIFT%2BP%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3ESign%20in%20to%20Microsoft%20Azure%2C%20by%20typing%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAzure%3A%20Sign%20In%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EA%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ebrowser%20window%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewill%20open%20to%20login%20to%20Azure%3C%2FLI%3E%0A%3CLI%3EPress%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECTRL%2B%20SHIFT%2BP%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EType%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOpen%20PowerShell%20in%20Cloud%20Shell%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOpen%20Bash%20in%20Cloud%20Shell%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EThis%20will%20connect%20you%20directly%20to%20your%20Cloud%20Shell%20running%20in%20Azure.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20gives%20you%20an%20overview%20of%20how%20you%20can%20run%20Cloud%20Shell%20directly%20in%20Visual%20Studio%20Code.%20If%20you%20have%20any%20questions%2C%20leave%20a%20comment.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-663431%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20run%20the%20Azure%20Cloud%20Shell%20directly%20in%20Visual%20Studio%20Code!%20and%20here%20is%20how!%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-663431%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECloud%20Shell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

 

As you may know, I am a huge fan of the Azure Cloud Shell. I use it often directly in the Azure Portal, on Microsoft Docs, in the Azure Mobile App or on shell.azure.com. A lot of times I am editing files and writing code and Azure Resource Manager (ARM) templates in Visual Studio Code and in that case I need to either use a local Azure PowerShell or Azure CLI installation or switch from Visual Studio Code back in the browser to use Cloud Shell. However, there is also a third option, which allows me to run Cloud Shell directly within Visual Studio Code.

 

To set up Cloud Shell in Visual Studio Code you need to do two things. First, you need to install nodeJS and the Azure Account extension.

 

Next, you can log in to Azure and open PowerShell or Bash in Cloud Shell:

 

Cloud-Shell-in-Visual-Studio-Code.gif

 

 

  1. Press CTRL+SHIFT+P
  2. Sign in to Microsoft Azure, by typing Azure: Sign In
  3. A browser window will open to login to Azure
  4. Press CTRL+ SHIFT+P
  5. Type Open PowerShell in Cloud Shell or Open Bash in Cloud Shell
  6. This will connect you directly to your Cloud Shell running in Azure.

 

I hope this gives you an overview of how you can run Cloud Shell directly in Visual Studio Code. If you have any questions, leave a comment.