r/PowerShell • • Mar 30 '22

Why Microsoft, Why?

Just got off a support call with a MS Engineer. He shared with me that Microsoft is looking to get rid of PowerShell ISE in the next three to five years.

I swear they get together for beer on Friday and say "Hey, you want to know what will really piss people off?", then do it after a good hearty laugh.

221 Upvotes

401 comments sorted by

View all comments

Show parent comments

34

u/Formal-Sky1779 Mar 30 '22

I really love VSC! Specially when you customize the JSON file so you can for example browse through your code and run a single line of code with F8. Without clicking again on the editor, just use the arrow keys to navigate and hit F8 to run another line. The cursor is always in editor mode, even after a run. Great feature to me for debugging some pieces of code.

5

u/RodneyRabbit Mar 30 '22

I thought F8 was standard. It is standard in ISE, and I don't remember needing to configure it specifically for VSC.

F8 also runs highlighted blocks but what I really want is another function key to show the contents of a variable on the command line if the cursor is on that variable, without needing to highlight it and use F8.

1

u/thatto Mar 31 '22

In vs code, when you hit f8 the cursor jumps to the terminal window. It's annoying as s***.

I haven't really gotten into the customization part of the vs code, but it seems like I might have to :-)

1

u/Formal-Sky1779 Mar 31 '22

Exactly. The nice part is, you don’t have to highlight to F8 the code. Just stand on whatever part of the line an run by F8. So nice to use the mouse so much less like this :)

-3

u/BigHandLittleSlap Mar 31 '22

That's monumentally dangerous.

With great Power(shell) comes great responsibility.

I regularly run scripts that could destroy companies if mishandled.

This kind of stupid magic is great for startup companies full of uni graduates banging out Node.js scripts, with a poster on the wall saying "move fast and break things."

I can't afford to break things. I have responsibilities.

I'm fed up with the "too smart" attitude of the VS Code team. They keep adding features that are outright dangerous to save... what... ONE click?

2

u/Formal-Sky1779 Mar 31 '22

So how is running a single line of code with F8 more dangerous than running the entire block of code with F5 with not only VSC but ISE as well?

2

u/RodneyRabbit Mar 31 '22

It's been the same in ISE for as long as it's been around, and also in VSCode for as long as I remember. It's not a new feature lol. Better to have F5 and F8 be consistent on both.

1

u/RodneyRabbit Mar 31 '22

I don't know if you mean VSCode vs ISE but the behaviour is exactly the same: F5 runs full script, F8 unhighlighted runs the current line, F8 highlighted runs the highlighted block, and they both leave the cursor in the output terminal. There's no difference between them.

1

u/Formal-Sky1779 Mar 31 '22

That’s not exactly the case. My cursor stays in the editor and that kind of things you can edit with the JSON. That is what I love in VSC..

1

u/RodneyRabbit Mar 31 '22

ISE also leaves the cursor in the terminal though, at least on the clean Win 10 install I just tested on. You can use CTRL-I and CTRL-D to switch between them.

In VSCode I believe there's still no default keybinding to switch between them but someone else posted this years ago to map CTRL-' so it cycles between them. Just add this to keybindings.json:

[
    // Toggle between terminal and editor focus
    { "key": "ctrl+`", "command": "workbench.action.terminal.focus"},
    { "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"}
]

19

u/amplex1337 Mar 30 '22

Lol, just like ISE but it's not included with the OS..

6

u/Abracadaver14 Mar 30 '22

Just like ISE used to be, until MS fucked that up in recent builds of Win10 and 2019...

1

u/BighornPorpoise Mar 30 '22

Is that when F8 changed!?!?

I thought I had some ridiculous setup or hit a switch to make it behave that way before and I just never could reconfig my new machines that way.

Triggered

-3

u/Flguy76 Mar 31 '22

I Hate coding.. like really really hate it... Never wanted to get into it just stayed a sys engineer my whole career if they take away PS and leave us with Visual BS... Im going to light a fire in the datacenter and just burn all the racks... ok no i wont but i would really want to...

1

u/BlackV Mar 31 '22

thats the same in ISE though

1

u/Black_Magic100 Mar 31 '22

Wuttttt how?!?