Skip to content

when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals #21393

Closed

Description

Type: Bug

when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals named Python, where the first one opens the python terminal (PID 29056) but the second (PID 434444) does not. After that, it tries to execute the highlighted code in the second terminal which obviously is yielding an error.
If I kill the second Python terminal (PID 434444) and try to run a line of Python again, it opens a new terminal with a new PID and no Python console and behaves exactly like the second one.
If I kill the first terminal and then run the line it does not create another console, but still not running the code.
Finally, if I type python in the second console it opens the python terminal, and if I start running line-by-line execution it works.

Extension version: 2023.10.0
VS Code version: Code 1.79.0 (b380da4ef1ee00e224a15c1d4d9793e27c2b6302, 2023-06-07T14:26:35.552Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.61GB (4.01GB free)
Process Argv --crash-reporter-id d885eecb-5cf7-428f-a093-4ece42fa5348
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30730052
hidesbindicator:30760978
pythongtdpath:30739704
i26e3531:30763805
dh2dc718:30763024
pythonnosm12tcf:30757130

Activity

  1. lux5 commented on Jun 10, 2023

    @lux5

    I have got the same issue after I upgraded to v2023.10.0.
    When trying to run the selected codes by pressing Shift + Enter -> end up with two terminal windows open:

    1. The first terminal window just activates Python and no follow-up executing the selected codes.
    2. The second terminal is just the default terminal with those Python codes with no python environment.

    Version: 1.79.0 (user setup)
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:26:35.552Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.18363

  2. Lauler commented on Jun 10, 2023

    @Lauler

    Same issue on Linux/Ubuntu.

    Version: 1.79.0
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:28:44.251Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Linux x64 5.15.0-73-generic

  3. selgamal-telnyx commented on Jun 11, 2023

    @selgamal-telnyx

    same issue windows 11, reported here with all details

  4. KatlehoJordan commented on Jun 11, 2023

    @KatlehoJordan

    same issue windows 11, reported here with all details

    microsoft/vscode#184790 (comment)

    As someone tipped you there, try rolling back to v2023.8.0 of the vscode-python extension.

    Some bug appeared in the latest version, it seems.

  5. dirk2011 commented on Jun 11, 2023

    @dirk2011

    Have this bug also.

    Version: 1.79.0
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:28:44.251Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Linux x64 5.4.0-150-generic

  6. chrigraf commented on Jun 11, 2023

    @chrigraf

    Same here:
    Version: 1.79.0 (user setup)
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:26:35.552Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.19045

  7. starball5 commented on Jun 11, 2023

    @starball5

    Related on Stack Overflow:

    If you have the privilege level to do so, help with closing duplicates would be appreciated, so the answers can be put in one place instead of scattered about.

  8. ctedja commented on Jun 12, 2023

    @ctedja

    Was also facing this issue. Rolling back to v2023.8.0 seemed to help.

  9. Noath2302 commented on Jun 12, 2023

    @Noath2302

    same issue for me, thank you starball (@starball5), rolling back really helps

    Version: 1.79.0 (user setup)
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:26:35.552Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.19045
    
  10. IAmMalteC commented on Jun 12, 2023

    @IAmMalteC

    Same issue here. Rollback helps

    Version: 1.79.0 (user setup)
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Datum: 2023-06-07T14:26:35.552Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    Betriebssystem: Windows_NT x64 10.0.19045
    
  11. smoudour commented on Jun 12, 2023

    @smoudour

    Same issue here, Windows 10. Rolling back to v2023.8.0 seems to work.

  12. emillykkejensen commented on Jun 13, 2023

    @emillykkejensen

    Same here:
    Version: 1.79.0 (user setup)
    Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
    Date: 2023-06-07T14:26:35.552Z
    Electron: 22.5.5
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Windows_NT x64 10.0.22621

  13. brettcannon commented on Jun 13, 2023

    @brettcannon
    Member

    I just wanted to quickly apologize for the breakage! #21418 has been opened to revert this new terminal feature to fix this breakage. Unfortunately none of our pre-release users ran across this (been in main since May 10, so available in pre-release since May 11; obviously if anyone here is interested in using pre-release versions, more help is always appreciated 😁), and we seem to have a gap in our tests around this flow (which I have opened #21420 to fill that gap).

    Our hope is to have a bugfix release out today or tomorrow depending on how the revert PR goes.

  14. 4 remaining items

  15. added
    bugIssue identified by VS Code Team member as probable bug
    importantIssue identified as high-priority
    regressionBug didn't exist in a previous release
    needs PRReady to be worked on
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Jun 13, 2023
  16. karthiknadig commented on Jun 14, 2023

    @karthiknadig
    Member

    This fix is out. Stable users v2023.10.1 (latest stable) and for insiders users it is v2023.11.11651007 (latest insiders)

  17. locked as resolved and limited conversation to collaborators on Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityregressionBug didn't exist in a previous releaseverifiedVerification succeeded

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions