Vscode-powershell: Run Selection with F8 defaults cursor to Terminal

Created on 15 Mar 2017  路  4Comments  路  Source: PowerShell/vscode-powershell

System Details

  • Operating system name and version: 10.0.10586
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10.0
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.0.10586.63
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.63
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Not sure if it's by design but running selection using F8 defaults the cursor location to the integrated terminal meaning you have to move back to the editor.

Tested on a colleagues VSCode and his cursor remains in the editor when using F8 to run selection. Unsure which version he is using specifically unfortunately.

ISE also remains in the editor.

Most helpful comment

You can add the setting to your profile @jakobGSvendsen.

"powershell.integratedConsole.focusConsoleOnExecute": false

I spoke to @daviwil about it and the setting couldn't be implemented by default so it's now a user setting.

All 4 comments

Whoops, forgot about this issue when I filed #556. At any rate, this has been fixed now, will be shipped in a day or so!

this issue is still there on multiple install I have made within the last month?

Can I disable it?

You can add the setting to your profile @jakobGSvendsen.

"powershell.integratedConsole.focusConsoleOnExecute": false

I spoke to @daviwil about it and the setting couldn't be implemented by default so it's now a user setting.

Hey Jakob! Brett is correct, we had to leave "focus console on execute" as the default behavior due to accessibility requirements. If you add the setting that Brett pasted to your User Settings, you'll get the behavior that you want.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheDanishDynamo picture TheDanishDynamo  路  3Comments

guidooliveira picture guidooliveira  路  3Comments

AWahlqvist picture AWahlqvist  路  3Comments

daviwil picture daviwil  路  4Comments

keposet picture keposet  路  3Comments