Skip to content

Add Feature to List PowerShell Builds in Session Menu when Working on PowerShell Core #1242

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

Closed
markekraus opened this issue Mar 23, 2018 · 10 comments

Comments

@markekraus
Copy link

markekraus commented Mar 23, 2018

I do quite a few builds of PowerShell from VS Code and one feature I think that would be really nice is the ability to automatically detect PowerShell builds form the project root and add them to the selection list in the PowerShell Session Menu:

20180-03-23-02

Ideally, it would detect the release or debug builds, populate them in the PowerShell session menu, and make them available as options to run the integrated console and debugger against.

System Details

  • Operating system name and version:
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:

PS C:\Users\MarkLocal\Documents\github\PowerShell> code -v
1.21.1
79b44aa704ce542d8ca4a3cc44cfca566e7720f1
x64
PS C:\Users\MarkLocal\Documents\github\PowerShell> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      6      0      0


PS C:\Git\PowerShell> code --list-extensions --show-versions
bbenoist.vagrant@0.5.0
bradygaster.azuretoolsforvscode@2.0.2
CoenraadS.bracket-pair-colorizer@1.0.26
DavidAnson.vscode-markdownlint@0.14.1
DotJoshJohnson.xml@1.9.2
DougFinke.vscode-PSStackoverflow@0.0.2
eamodio.gitlens@8.1.1
EditorConfig.EditorConfig@0.12.1
formulahendry.code-runner@0.9.3
gerane.Theme-TomorrowNight@0.0.2
johnpapa.azure-functions-tools@0.3.3
ms-azuretools.vscode-azureappservice@0.6.1
ms-azuretools.vscode-azurefunctions@0.7.0
ms-azuretools.vscode-azurestorage@0.2.0
ms-azuretools.vscode-cosmosdb@0.5.0
MS-DevSkim.vscode-devskim@0.2.2
ms-mssql.mssql@1.3.0
ms-python.python@2018.2.1
ms-vscode.azure-account@0.3.3
ms-vscode.azurecli@0.4.1
ms-vscode.cpptools@0.15.0
ms-vscode.csharp@1.14.0
ms-vscode.PowerShell@1.6.0
ms-vscode.vscode-azureextensionpack@0.0.8
ms-vsts.team@1.122.0
msazurermtools.azurerm-vscode-tools@0.4.0
Pendrica.chef@0.6.4
PeterJausovec.vscode-docker@0.0.25
robertohuertasm.vscode-icons@7.22.0
streetsidesoftware.code-spell-checker@1.6.5
twxs.cmake@0.0.17
usqlextpublisher.usql-vscode-ext@0.2.11
VisualStudioOnlineApplicationInsights.application-insights@0.4.2
vsciot-vscode.azure-iot-edge@0.1.3
vsciot-vscode.azure-iot-toolkit@0.6.0
yzhang.markdown-all-in-one@1.1.0

Name                           Value
----                           -----
PSVersion                      6.0.2
PSEdition                      Core
GitCommitId                    v6.0.2
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name                           Value
----                           -----
PSVersion                      5.1.16299.251
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.251
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I am experiencing a problem with...

Attached Logs

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

@rkeithhill
Copy link
Contributor

It seems like if we could make powershell.powerShellExePath a workspace setting then it would address this issue well enough, right? I mean, this feature request is pretty corner-case. :-)

@markekraus
Copy link
Author

No really. When working on the project I may switch from Windows PS, to Core, to Debug Build, to Release Build. I may have a temporary editor file open with the same snippet of code and testing the behavior in each, or just going back and forth from building and debugging. I do a bunch of jumping around of PS versions in this work space, so the setting in the workspace wouldn't really address this.

I agree this is kind of niche case. this is a "nice to have" for me that @tylerl0706 suggested I open an issue on.

Is there an editor command to update that menu? If so, I could add it as a function in the project code rather than request it here.

@TylerLeonhardt
Copy link
Member

There isn't an editor at this time. That said, as a work around, it could be possible to write a script to modify the setting @rkeithhill mentioned and then restart the current session (this part you may have to do manually).

It's not ideal and I want to make this better for PowerShell contributors.

@TylerLeonhardt
Copy link
Member

@rkeithhill your PR will address this as well, right?

@rkeithhill
Copy link
Contributor

I think so. It will not "detect" them automatically but it will allow you to add paths via the powershell.powerShellAdditionalExePaths settings.

@TylerLeonhardt
Copy link
Member

@markekraus are you happy with that?

@markekraus
Copy link
Author

@tylerl0706 @rkeithhill yes.. that works for me!

@rjmholt
Copy link
Contributor

rjmholt commented May 24, 2018

@rkeithhill's PR addressed this right?

@rkeithhill
Copy link
Contributor

I think so. What say you @markekraus ?

@markekraus
Copy link
Author

Yes! Thanks @rkeithhill

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