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

Feature request: add interactive REPL window, ala PowerShell ISE #10

Closed
codemonkeychris opened this issue Nov 18, 2015 · 19 comments
Closed
Labels
Feature: VS Code Request to use or implement a VS Code feature.

Comments

@codemonkeychris
Copy link

No description provided.

@rkeithhill
Copy link
Collaborator

FYI, while you are debugging you can execute arbitrary commands in the Debug console. My understanding is that a generic REPL feature is something the VS Code team needs to support first. @daviwil - correct me if I'm wrong this count.

@daviwil
Copy link
Contributor

daviwil commented Nov 18, 2015

Keith is exactly right. Let's start bugging them with feedback about having a persistent REPL which doesn't require the debugger!

@daviwil daviwil added the Feature: VS Code Request to use or implement a VS Code feature. label Nov 18, 2015
@singhkays
Copy link

+1 on this!

@dcrreynolds
Copy link

This would be great to have!

@dotps1
Copy link

dotps1 commented Nov 23, 2015

+1

1 similar comment
@ducke
Copy link

ducke commented Nov 23, 2015

👍

@daviwil
Copy link
Contributor

daviwil commented Nov 23, 2015

Just got one step closer to this: the new update (0.2.0) includes a "Run selection" command bound to F8 which allows you to run a script selection and see the output. Not exactly "interactive" but does allow you to run arbitrary PowerShell code and see the output. I'll keep this bug open until full interactive console support is completed.

@pstephens
Copy link

+1

@hairylime
Copy link

yes, please - close the book on ISE completely with this feature

@daviwil
Copy link
Contributor

daviwil commented Jun 16, 2016

The new integrated terminal in VS Code has opened up some interesting possibilities, I'm looking into how I can use that to our advantage :)

@JustinGrote
Copy link
Collaborator

That would be great! For now I use the integrated terminal and dot source the scripts I need as a sort of poor man's REPL, but having it more seamless would be great.

@daviwil daviwil added this to the 0.8.0 milestone Aug 26, 2016
@daviwil
Copy link
Contributor

daviwil commented Aug 26, 2016

I'm going to experiment a little bit and see if I can make something happen here for the 0.8.0 release of the extension.

@dotps1
Copy link

dotps1 commented Aug 26, 2016

do it @daviwil! DO IT!

@JustinGrote
Copy link
Collaborator

I'd say it's not the highest of high priorities, but it is basically the only reason why I use ISE anymore, I'll flip back there if I need to "experiment" with a script because it's just way too cumbersome to start, debug, can't F9/paste some code into that same debug session easily to try it over and over in a particular context (e.g. middle of a foreach loop), etc., and then lose all my state if I want to tweak something in the code and re-run it.

How I would ideally like to see this is a config setting or something that says "make the debug session persistent", so that every time I run, it keeps in the same powershell environment and doesn't recycle it. Then the debug console effectively becomes REPL, although I'd prefer the debug console to behave more like the new Integrated Terminal feature, that's a lot to ask for the initial implementation I think.

Having the debug console effectively "be" the new Integrated Terminal would be the most ideal and ISE-like, especially if you can connect to a remote session. I really like how ISE handles this and basically if I can get ISE style ad-hoc REPL debugging in a persistent session.

If I got that with the awesome variable watching of VSCode, I would probably relegate ISE to the same level that I would use "notepad" on a server, when I don't have the better tool available.

Thanks for your consideration, you have been busting your butt on this extension and it shows, and I'm sure you see from the downloads and likes on it that it is much used and much appreciated and your efforts are far from in vain :)

@daviwil
Copy link
Contributor

daviwil commented Aug 26, 2016

@JustinGrote actually your suggestion isn't very far off from what I've got in mind. In the next release of VS Code the debugger will be able to launch a console app directly into the integrated terminal. They've also provided an API where the extension code can launch a debug session on its own.

Putting those two features together, I'll basically be able to auto-launch a persistent debug session with powershell.exe running in the integrated terminal. If I can bootstrap the language/debug services from within that, we'll basically have an ISE-like console experience with full script debugging for whatever you do in the session. There are many ways in which this could go horribly wrong, but it seems compelling enough that I've got to try it :)

Thanks a lot for the kind words!

@JustinGrote
Copy link
Collaborator

I agree seems worth a shot. We'll see how it goes, thanks again.

@daviwil
Copy link
Contributor

daviwil commented Mar 15, 2017

I just released v0.10.0 which contains an ISE-like integrated console experience. Please give it a try and let me know what you think!

@daviwil daviwil closed this as completed Mar 15, 2017
@cnavarro16
Copy link

cnavarro16 commented Mar 24, 2017

Running 0.10.0 I was, unfortunately, not having variables persist after a debug. So, if I set $a = 1, entering $a into the terminal would not return anything. Now, with v0.11.0, the variables persist in both the terminal, and the editor. Top work!

@ahubbard
Copy link

Excellent!

@daviwil daviwil removed this from the Backlog milestone May 18, 2017
@daviwil daviwil removed this from the Backlog milestone May 18, 2017
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.
Projects
None yet
Development

No branches or pull requests