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

VS Code "powershell.developer.powerShellExePath" not changing path to executable #295

Closed
MaximoTrinidad opened this issue Sep 17, 2016 · 9 comments

Comments

@MaximoTrinidad
Copy link

Please fill in these details so that we can help you!

System Details

  • Operating system name and version: Windows Server 2016 TP5
  • VS Code version: 1.5.2
  • PowerShell extension version: PowerShell 6.0.0-alpha.10
  • Output from $PSVersionTable: See attached image.

Please see attached image.
vscodeposhpathissue

Evaluate $PSVersionTable in PowerShell and paste the output here

Issue Description

I'm not able to change PowerShell executable path to point to ver. 6.0.0.10:
"C:/Program Files/PowerShell/6.0.0.10/PowerShell.exe" in "settings.json" file.

Following instructions on link: https://github.com/PowerShell/PowerShell/blob/master/docs/learning-powershell/using-vscode.md

In VS Code Output panel $PSVersionTable results stills shows: PSVersion 5.1.14300.1000.

I'm using the "Code Runner" extension.

Attached Logs

Log files attached!
1474148131-PowerShelllog.txt
1474148131-EditorServiceslog.txt

Follow the instructions in the README
about capturing and sending logs.

@daviwil
Copy link
Contributor

daviwil commented Sep 17, 2016

The "Code Runner" extension isn't owned by us and doesn't use this setting. If you check the PowerShelllog.txt you'll see that the PowerShell extension is indeed using the PowerShell exe path that you specified. You can also see this in the Editor Services log:

    PowerShell runtime version: 5.0, edition: Core

Maybe the "Code Runner" extension has its own setting?

@MaximoTrinidad
Copy link
Author

Hi David,

I could find any custom settings for PowerShell.

So, what's the VS Code way to run and see the results of a PowerShell script? How can I verify that's executing the changed execute path?

I find "Code Runner" practical but that's because I'm trying understand VS Code environment settings.

Any hints?

Greatly Appreciated,
Max

@rkeithhill
Copy link
Contributor

In the current version, the output from your script is displayed in the debug console. You can open the debug console by pressing the little terminal icon in the upper-right part of the Debug tool window. Or on Windows press Ctrl+Shift+Y.

@daviwil
Copy link
Contributor

daviwil commented Sep 17, 2016

The best option for simple script evaluation is to select some text and press F8. We've got a crude interactive console support which doesn't let you type commands but you can evaluate selections in your script. You can type $PSVersionTable into your file, select it, then hit F8 to see the version info of the PowerShell edition you're running in.

The next major release of the PowerShell extension (0.8.0) should have full interactive console support to bring VS Code closer to the ISE development experience. Hoping to get that out in early October!

@MaximoTrinidad
Copy link
Author

That's Great! Thanks for your quick response. I was going to showcase this on my PowerShell User Group on Sept.29th with lots of other goodies.

Thanks again,
Maximo Trinidad
:)

@MaximoTrinidad
Copy link
Author

Thanks Keith!

@zaxebo1
Copy link

zaxebo1 commented Sep 20, 2016

please release the binary flatpak format (so that one can install it across linux distributions and also without administrative access)
as of now, releasing only in .deb and .rpm format forces one to install in global admin places with admin rights mode only.

please see http://www.flatpak.org for details

@daviwil
Copy link
Contributor

daviwil commented Sep 20, 2016

Hey @zaxebo1, this would be better as a request to the Visual Studio Code team since our extension gets installed as part of that. It seems that another user has already filed this request there, so they're aware of it already: microsoft/vscode#7112

@daviwil
Copy link
Contributor

daviwil commented Oct 12, 2016

I think this issue is resolved now, right? I'll close it for now, happy to reopen if there's still a lingering issue. Thanks!

@daviwil daviwil closed this as completed Oct 12, 2016
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

4 participants