Skip to content

Run button with an unsaved buffer fails execution and closes the buffer #20953

@brettcannon

Description

@brettcannon

Type: Bug

When hitting the run button with a new, unsaved buffer, the buffer itself gets closed and the wrong file path is passed into the terminal for execution.

screen-capture

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.2
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): MicrosoftStore
  • Value of the python.languageServer setting: Pylance
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"

linting
• enabled: false

formatting
• provider: "black"

testing
• autoTestDiscoverOnSaveEnabled: false

experiments
• optInto: ["All"]

Extension version: 2023.7.10881020
VS Code version: Code - Insiders 1.77.0-insider (7f329fe6c66b0f86ae1574c2911b681ad5a45d63, 2023-03-29T09:56:00.839Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
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
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.75GB (4.19GB free)
Process Argv --crash-reporter-id 2f8216b4-0af9-4bf4-a156-6cdcff01b0ab
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256198
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vsdfh931:30280409
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vscaat:30438846
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
showlangstatbar:30659908
pythonb192cf:30661257
azdwalk:30687957
pythonms35:30671666
03d35959:30680466
ecj1e332:30687743
pythonclientmv:30700173

Metadata

Metadata

Assignees

Labels

area-terminalbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions