Azure Cloud Shell doesn't open visual code #9533

Closed
opened 2026-01-31 01:56:50 +00:00 by claunia · 6 comments
Owner

Originally created by @dsgon on GitHub (Jul 9, 2020).

Environment

Windows build number: Microsoft Windows NT 10.0.18362.0
Windows Terminal version: Version: 1.0.1811.0
Visual Studio Code: 1.46.1(user setup)

Steps to reproduce

From Azure Cloud Shell connection you open visual code with the command
code
or
code <a file>

And visual code doesn't open.

Expected behavior

Visual Code editor is open how Powershell or cmd or Powershell core does.

Actual behavior

The console show a command executed and a new line ready to receive a new instruction.

user@Azure:~$ code
user@Azure:~$

Image from Azure Cloud Shell
image

Image from Powershell core
image

Originally created by @dsgon on GitHub (Jul 9, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ``` Windows build number: Microsoft Windows NT 10.0.18362.0 Windows Terminal version: Version: 1.0.1811.0 Visual Studio Code: 1.46.1(user setup) ``` # Steps to reproduce From Azure Cloud Shell connection you open visual code with the command ``` code ``` or ``` code <a file>``` And visual code doesn't open. # Expected behavior Visual Code editor is open how Powershell or cmd or Powershell core does. # Actual behavior The console show a command executed and a new line ready to receive a new instruction. ``` user@Azure:~$ code user@Azure:~$ ``` Image from Azure Cloud Shell ![image](https://user-images.githubusercontent.com/37479902/87086358-de65e200-c207-11ea-921e-9bc9ceae91d7.png) Image from Powershell core ![image](https://user-images.githubusercontent.com/37479902/87086511-14a36180-c208-11ea-863b-48ed62161a74.png)
claunia added the Resolution-By-DesignResolution-Duplicate labels 2026-01-31 01:56:50 +00:00
Author
Owner

@oising commented on GitHub (Jul 9, 2020):

@dsgon This is expected. The Azure Cloud shell isn't running on your machine. It's running in your Azure account, on a virtual machine.

@oising commented on GitHub (Jul 9, 2020): @dsgon This is expected. The Azure Cloud shell isn't running on your machine. It's running in your Azure account, on a virtual machine.
Author
Owner

@juniorccs commented on GitHub (Nov 15, 2021):

For me following the Microsoft tutorial, the commands don't work like it's written for Firefox or Edge, only for Chrome

https://docs.microsoft.com/en-us/learn/modules/control-access-to-azure-storage-with-sas/4-exercise-use-shared-access-signatures

The command in there is the following

code sas/appsettings.json

Because the code command is trying to open the file and the directory at the same time, doesn't work
I found the following solution

First you must access the subfolder (sas) in my case, so

CD sas
then you can type
code appsettings.json

The code command only opens the file when you are already inside of the folder where the file is in place
I hope this works for you all

@juniorccs commented on GitHub (Nov 15, 2021): For me following the Microsoft tutorial, the commands don't work like it's written for Firefox or Edge, only for Chrome https://docs.microsoft.com/en-us/learn/modules/control-access-to-azure-storage-with-sas/4-exercise-use-shared-access-signatures The command in there is the following code sas/appsettings.json Because the code command is trying to open the file and the directory at the same time, doesn't work I found the following solution First you must access the subfolder (sas) in my case, so CD sas then you can type code appsettings.json The code command only opens the file when you are already inside of the folder where the file is in place I hope this works for you all
Author
Owner

@Onemanwolf commented on GitHub (Dec 6, 2021):

@dsgon This is expected. The Azure Cloud shell isn't running on your machine. It's running in your Azure account, on a virtual machine.
https://docs.microsoft.com/en-us/azure/cloud-shell/using-cloud-shell-editor

@Onemanwolf commented on GitHub (Dec 6, 2021): > @dsgon This is expected. The Azure Cloud shell isn't running on your machine. It's running in your Azure account, on a virtual machine. https://docs.microsoft.com/en-us/azure/cloud-shell/using-cloud-shell-editor
Author
Owner

@alex-nicholas commented on GitHub (Dec 15, 2021):

@oising
This is not by design, otherwise the microsoft documentation would not have countless articles about using the cloud shell code editor 'code'

It isn't supposed to open your local instance of VS Code, its supposed to open the Monaco editor,

This editor has the same look and feel as VS Code and has similar features (according to all the documentation surrounding it) and in MANY of the learn modules for Azure certifications, it is referenced as the preferred editor to use... All the documentation states that I should be able to type 'code .' to open the editor in my current directory, or 'code ' to open a specific file.

None of this functionality works as intended/described in the documentation.
Reference: https://docs.microsoft.com/en-us/azure/cloud-shell/using-cloud-shell-editor

@alex-nicholas commented on GitHub (Dec 15, 2021): @oising This is not by design, otherwise the microsoft documentation would not have countless articles about using the cloud shell code editor 'code' It isn't supposed to open your local instance of VS Code, its supposed to open the Monaco editor, This editor has the same look and feel as VS Code and has similar features (according to all the documentation surrounding it) and in MANY of the learn modules for Azure certifications, it is referenced as the preferred editor to use... All the documentation states that I should be able to type 'code .' to open the editor in my current directory, or 'code <FileName>' to open a specific file. None of this functionality works as intended/described in the documentation. Reference: https://docs.microsoft.com/en-us/azure/cloud-shell/using-cloud-shell-editor
Author
Owner

@zadjii-msft commented on GitHub (Dec 15, 2021):

FWIW, we're tracking this as a possible "extension" idea over in #5636. However though, the docs for the azure cloud shell almost exclusively to the web version of the cloud shell, not the Terminal bound one. The web version can make code work because they can easily embed an entire monaco instance in the webapp itself. The cloud shell in the Terminal, however, does not have that luxury. It's less tightly coupled than the web version, and we can't really embed a webview in the Terminal.

It's a nifty idea, so go pile in on that thread! But we'd probably need someone from the cloud shell team to help us figure out how to A. receive the request to open vscode, and B. open VsCode with the appropriate parameters to connect to the remote machine.

/dup #5636

@zadjii-msft commented on GitHub (Dec 15, 2021): FWIW, we're tracking this as a possible "extension" idea over in #5636. However though, the docs for the azure cloud shell almost exclusively to the web version of the cloud shell, not the Terminal bound one. The web version can make `code` work because they can easily embed an entire monaco instance in the webapp itself. The cloud shell in the Terminal, however, does not have that luxury. It's less tightly coupled than the web version, and we can't really embed a webview in the Terminal. It's a nifty idea, so go pile in on that thread! But we'd probably need someone from the cloud shell team to help us figure out how to A. receive the request to open vscode, and B. open VsCode with the appropriate parameters to connect to the remote machine. /dup #5636
Author
Owner

@ghost commented on GitHub (Dec 15, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Dec 15, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9533