Sep-11-2019, 04:28 PM
It is seen that on code execution via code runner (Ctrl+Alt+N), shifting of focus from code editor to integrated terminal does take place, provided preserveFocus property of code runner is set to false. This is found to be a helpful feature, eliminating the risk of inadvertent user interference to underlying code file.
Relevant entries in settings.json file are as follows:
For output in terminal pane:
As an exception, if code is executed via Ctrl+F5 (i.e. Start Without Debugging), the integrated terminal has focus while displaying the output.
It would be nice if there could be a solution ensuring universal automatic focus on output displayed in integrated terminal, including the following alternatives:
(a) Right click on code editor & selecting "Run Python File In Terminal".
(b) Shift+Enter for "Run Selection/Line In Python Terminal".
© Ctrl+Shift+B for executing the code as default task.
Relevant entries in settings.json file are as follows:
For output in terminal pane:
"code-runner.runInTerminal": true, "code-runner.preserveFocus": false,For output in output pane:
"code-runner.runInTerminal": false, "code-runner.preserveFocus": false,On the other hand if code is executed without involving code runner, focus continues to stay with the underlying code editor.
As an exception, if code is executed via Ctrl+F5 (i.e. Start Without Debugging), the integrated terminal has focus while displaying the output.
It would be nice if there could be a solution ensuring universal automatic focus on output displayed in integrated terminal, including the following alternatives:
(a) Right click on code editor & selecting "Run Python File In Terminal".
(b) Shift+Enter for "Run Selection/Line In Python Terminal".
© Ctrl+Shift+B for executing the code as default task.
A.D.Tejpal