Skip to content

Running cells in quick succession doesn't behave as expected #6982

@greazer

Description

@greazer

Version: 1.60.0-insider (user setup)
Commit: a4eb4d688477fb9f2176bb2ed932b0b1726caed3
Date: 2021-08-05T21:34:13.867Z (2 hrs ago)
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.22000

  1. Take a script that looks like this:
#%%
a = 1

#%%
b = a + 1

#%%
a = a + 1
  1. Click Run Below 3 times in quick succession
  2. Inspect the value of a.

Actual
image

Expected
'a' should be 2, right?

The reason this is the case can be seen in the execution history of the Interactive window:
image

I would have expected the history to show 3 consecutive copies of the 3 cells in the script running. Rather than each cell being run 3 times in a row.

This may seem contrived, but I ran into it by accident and I suspect that real situations could arise where things get goofed up and the user doesn't realize it.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginteractive-windowImpacts interactive windowverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions