You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: