Azure Cloud Shell doesn't open visual code
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 from Powershell core

@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.
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
@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
@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
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
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
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!