vscode-jupyter icon indicating copy to clipboard operation
vscode-jupyter copied to clipboard

Cells executed from the input box can be executed out of order

Open amunger opened this issue 2 years ago • 2 comments

  1. open a python file without having an active IW open
  2. execute the cell from the file
# %%
print(n)
  1. After the IW is created and while the kernel is connecting, run n=1 from the input box

Result: the second cell added (from the input box) is executed first image

The execution count in the CodeGenerator is also out of sync now, so debugging and error stack traces do not behave well

amunger avatar Jul 01 '22 22:07 amunger

you can also execute a set of long running cells from the file, the input box still jumps the line

# %%
import time
time.sleep(5)
# %%
time.sleep(5)
# %%
time.sleep(5)
#%%
time.sleep(5)

amunger avatar Jul 01 '22 22:07 amunger

Yeah this makes sense. The queue is in the Jupyter Extension. The input box doesn't go through the jupyter extension. We'd need to push the queue to core or have the behavior of the input box defined by the jupyter extension I think.

rchiodo avatar Jul 01 '22 22:07 rchiodo