Skip to content

Add ability to support multiple PS sessions #73

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
ebekker opened this issue Jan 17, 2016 · 5 comments
Closed

Add ability to support multiple PS sessions #73

ebekker opened this issue Jan 17, 2016 · 5 comments
Labels
Feature: VS Code Request to use or implement a VS Code feature. Issue-Enhancement A feature request (enhancement). Resolution-Answered Will close automatically.

Comments

@ebekker
Copy link

ebekker commented Jan 17, 2016

Similar to the way that ISE supports multiple session tabs, it would be useful to allow multiple isolated sessions in vscode. The visual metaphor may not work the same as the vscode UI frame may not allow the tabs-within-tabs concept, but perhaps something like a drop down that identifies a session ID associated with the current script view, and an option to "create new" so that the code can be executed under different sessions.

@daviwil
Copy link
Contributor

daviwil commented Jan 17, 2016

Hi Eugene,

Unfortunately we're limited by VS Code's general model in this case. Their concept of a session is an open window, so if you wanted multiple PowerShell sessions you'd need to open more than one window on different "workspace" folders. I don't think they'll allow us to add extra UI to select sessions since they're trying to keep things pretty streamlined.

Can you tell me more about how multiple session support would benefit your workflow? I certainly understand the general utility of it, but I'm curious whether there's something you were trying to do but couldn't.

@ebekker
Copy link
Author

ebekker commented Jan 18, 2016

Hi Dave,

So I was thinking about switching to vscode for all of my PS-related editing, but one of the things that I rely on with ISE is that I can have multiple sessions open to track a few different "trains of thought" for example different things that I'm working on that are distinct.

Another example would be when I'm working on developing and testing a module, I might be editing the module and related artifacts in one session and pop open a new, clean session, import the module and do some testing to make sure that the module is self-contained and nothing was in missed in scope.

I was just playing around with VSCode a bit and I wonder if there is some "artificial" structure that could be imposed by the file system -- such as grouping your PS scripts into subdirs and flagging each dir as it's own session when debugging/executing? Maybe you could create a little meta file like .psrun or something that gives a hint to the editor about how to run.

Although, I guess those details can be tracked within the editor itself, for example it has to track where debug breakpoitns are set, so it seems there's the capacity for this already there?

@JustinGrote
Copy link
Collaborator

JustinGrote commented Apr 18, 2023

This is a long time after the initial context of this question, but today you can run multiple separate editors in multiple separate projects with different versions of PowerShell. It is extremely unlikely that a "runspace per script" type setup would be feasible to implement in the current pipelined scenario, and this is the recommended workaround, in case anyone is comng here wondering the status :).

@andyleejordan
Copy link
Member

Thanks Justin, going to mark this as resolved too.

@andyleejordan andyleejordan added the Resolution-Answered Will close automatically. label Apr 18, 2023
@ghost ghost closed this as completed Apr 19, 2023
@ghost
Copy link

ghost commented Apr 19, 2023

This issue has been marked as answered and has not had any activity in a day. It has been automatically closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: VS Code Request to use or implement a VS Code feature. Issue-Enhancement A feature request (enhancement). Resolution-Answered Will close automatically.
Projects
None yet
Development

No branches or pull requests

5 participants