Run Selection (F8) has disappeared from VS Code / PS 5,1

Welcome Forums General PowerShell Q&A Run Selection (F8) has disappeared from VS Code / PS 5,1

This topic contains 5 replies, has 3 voices, and was last updated by

 
Participant
4 months ago.

  • Author
    Posts
  • #130274

    Participant
    Points: 479
    Rank: Contributor

    In Powershell ISE 5.1, there exists a "Run selection" in which only the highlighted block of code is executed.  It used to have an equivalent counterpart in the VS Code (6.1) environment:  F8 (under 'Go or 'Debug' on the menu).   While I cannot be 100% sure now, since it has "disappeared" on my system,  I cannot help recalling to myself that I had spent many hours testing "one- or two- liners" in a single  *.ps1 code file under VS Code, and just using the F8 key to run a selected block of code.  The feature still exists in my PS ISE 5.1 (Win7), but somehow I have the feeling it (i.e., F8 key for Run Selected) just disappeared in the VS Code environment.  Would be grateful for any guidance or advice.

  • #130302

    Moderator
    Points: 1,991
    Helping Hand
    Rank: Community Hero

    What is the version of VSCode you use ? and what all settings change you did in VSCode .

    • #130350

      Participant
      Points: 479
      Rank: Contributor

      Hello Mr KVprasoon,

      I'm using VS Code 1.30.0 (user setup), based on the Help >> About.

      I'm not sure/clear on what settings you  are referring to.

      Could you kindly please clarify?

      Many thanks.

  • #130352

    Participant
    Points: 17
    Rank: Member

    Hi,

    If you right click on the highlighted text do you get the option to "Run Selection"? Or if you highlight text and click "Terminal" in the menu bar do you have the option to "Run Selected Text"?

    • #130365

      Participant
      Points: 479
      Rank: Contributor

      I'm sorry .... Mr Kvprasoon and Mr Snakes ...

      Yes, when I right click the selected block of code I get the F8 for Run Selection.

      But — and this is where I made a mistake — I always thought it came from the drop-down menu under "Debug" — where the typical F5 (Start debugging) and Ctrl+F5 (Start without debugging) are also located.  I don't know why I remembered it this way.  I could swear I used F8 many times from Debug (maybe I'm dreaming!).

      My apologies and sincerest thanks to you both.

      Best,

  • #130373

    Participant
    Points: 17
    Rank: Member

    Hi Ramon,

    No problem at all, glad to help.

The topic ‘Run Selection (F8) has disappeared from VS Code / PS 5,1’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort