Skip to content

Workspace keeps switching from Output tab to Terminal tab on running #19914

@Stokestack

Description

@Stokestack

Type: Bug

Behaviour

Expected vs. Actual

I'm running Python code and upon every run, the focus changes from the Output tab to the Terminal tab. This is not desired.

I ensured that all the Python > Terminal options were unchecked in settings.

Steps to reproduce:

  1. Without the Python extension active (disable or uninstall it), open a Python file, select the Output tab, and run the code with the "Play" button at the upper right corner of the editor. The Output tab should remain active.

  2. Activate the Python extension. Repeat steps above. The Output tab loses focus and the Terminal tab is activated.

  3. Re-select the Output tab. Open the drop-down list next to the Run button and select "run code." Note that the Output tab remains selected. Run again by pressing the button. Once again, the Output tab remains selected.

From the above we learn that the Run button has a hidden, persistent state that isn't indicated visually by the button and isn't even marked in the drop-down list. Furthermore, the Python extension is forcing the Terminal tab upon the user without approval, with no way to countermand it.

The hidden Run-button option problem is filed here.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.12
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Pyenv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

terminal
• activateEnvironment: false

Extension version: 2022.14.0
VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:05:37.721Z)
OS version: Darwin x64 20.6.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (8 x 4000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: unavailable_off
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 4, 3, 3
Memory (System) 32.00GB (1.61GB free)
Process Argv --crash-reporter-id ca508d67-2499-416f-9d92-4fafda7d4800
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
i497e931:30553904
pyindex848cf:30577861
40g7c324:30573242

Metadata

Metadata

Assignees

Labels

area-terminaldebtCovers everything internal: CI, testing, refactoring of the codebase, etc.needs PRReady to be worked onverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions