Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure Cloud Shell code Editor #5636

Open
micgruber opened this issue Apr 29, 2020 · 6 comments
Open

Add support for Azure Cloud Shell code Editor #5636

micgruber opened this issue Apr 29, 2020 · 6 comments
Labels
Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@micgruber
Copy link

Environment

Windows build number: Windows 10 Version 1909 Build 18363.657
Windows Terminal version: 0.11.1121.0

Steps to reproduce

  1. Open the Windows Terminal
  2. Open Azure Cloud Shell
  3. Login to Azure
  4. Type code . or code file.txt

Expected behavior

The azure cloud shell editor should open in the background with the provided file like explained here: https://docs.microsoft.com/en-us/azure/cloud-shell/using-cloud-shell-editor.

Actual behavior

Nothing happens no editor will be opened.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 29, 2020
@zadjii-msft
Copy link
Member

Huh, there was another thread on this repo months ago about this but the user never actually provided any more info about what code . was supposed to do. TIL about the code thing, thanks, that's pretty cool actually!

I'm very curious how that actually works in the browser. It's certainly easy enough for them to embed a JS text editor somewhere in the html of the webpage, but that would be a little trickier for us.

I'll tag this up as a potential extension idea in the future, since this correlates strongly with a lot of the work we're doing there.

@zadjii-msft zadjii-msft added Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels Apr 29, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 29, 2020
@zadjii-msft zadjii-msft changed the title Azure Cloud Shell Editor missing Add support for Azure Cloud Shell code Editor Apr 29, 2020
@micgruber
Copy link
Author

Hi,

thanks for the quick reply. Is it also possible as a workaround to use visual studio code within the azure cloud shell and launch the file in windows visual studio code like with the ubuntu wsl?

@DHowett-MSFT
Copy link
Contributor

Unfortunately, this might be something we just can't do. It only works on the web because Code can be embedded in the webapp. Hmm.

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 30, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal Backlog milestone Apr 30, 2020
@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. and removed Issue-Task It's a feature request, but it doesn't really need a major design. labels Dec 15, 2021
@GraemeMeyerGT
Copy link

Could you include an error message explaining that the feature isn't available? Right now if you run code in Az Cloud Shell it just fails silently. Not sure if that would be a WT issue or an AzCS issue. As another commenter suggested, reditrecting/referring to VSCode seems like a good work-around

@zadjii-msft
Copy link
Member

Could you include an error message explaining that the feature isn't available

I'm not sure that's something we could control. That'd have to be a feature of the Cloud Shell itself I'm afraid.

@richeney
Copy link

richeney commented Apr 3, 2023

Are Code Tunnels an option here?

On an Ubuntu VM I can run the following:

wget https://code.visualstudio.com/sha/download?build=stable\&os=cli-alpine-x64 -O /tmp/code.tar.gz
sudo tar -zxvf /tmp/code.tar.gz -C /usr/local/bin && rm /tmp/code.tar.gz
code tunnel --name $(hostname) --accept-server-license-terms

And awesome things happen. (Code Tunnels are so good.)

I tried the following on Cloud Shell in Windows Terminal:

wget https://code.visualstudio.com/sha/download?build=stable\&os=cli-alpine-x64 -O /tmp/code.tar.gz
[[ ! -d ~/.local/bin ]] && mkdir -pm 755 ~/.local/bin
tar -zxvf /tmp/code.tar.gz -C ~/.local/bin && rm /tmp/code.tar.gz
mv ~/.local/bin/code ~/.local/bin/vscode
vscode tunnel --name $(hostname | cut -c1-20) --accept-server-license-terms --no-sleep

And it does the OAuth part, but then gets stuck in an API storm of some type, looping with this error: "This application has made an unusually high number of requests to access your account. Please reauthorize the application to continue."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants