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

Ability to run Powershell script in VSC editor on the Cloud Shell. #1560

Closed
chrmarti opened this issue Oct 4, 2018 · 2 comments
Closed

Ability to run Powershell script in VSC editor on the Cloud Shell. #1560

chrmarti opened this issue Oct 4, 2018 · 2 comments

Comments

@chrmarti
Copy link

chrmarti commented Oct 4, 2018

From @Ayanmullick in microsoft/vscode-azure-account#96:

Currently, one cannot run Powershell script open in the VSC editor directly in the Azure Cloud Shell since both Cloud Shell and Powershell run in separate workspaces in VSC, this is why a ps1 script will try to open a Powershell terminal, it doesn’t see the Cloud Shell as a Powershell process.

The only option is to 'Run selected text' in the Cloud Shell terminal. This limitation shouldn't be there. Please enhance the extension to get rid of this limitation.

@rjmholt
Copy link
Contributor

rjmholt commented Oct 4, 2018

VSCode already offers functionality for this using the Terminal: Run Active File in Active Terminal. VSCode handles all the complexity here, so we don't need to do anything special for it to work in the Integrated Terminal.

However, we don't know anything about the Azure account or remote file system (we can given a remoting session, but in general that is not the case). It sounds like the Azure Account Extension needs to intercept this call in VSCode (and the related one: Terminal: Run Selected File in Terminal) and route the invocation back to CloudShell using the local path on the remote instance. It might be more complicated than that of course, but it's something the Azure Account Extension is definitely better placed to handle.

@chrmarti I'm going to close the issue here, since I think this is a scenario the Azure Account Extension scenario is much better placed to handle -- we can only help here if a user is remoted into CloudShell.

@rjmholt rjmholt closed this as completed Oct 4, 2018
@chrmarti
Copy link
Author

chrmarti commented Oct 5, 2018

Makes sense, I will this track in the original issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants