Skip to content

VS Code Insiders don't run the cell with shift+Enter in a .py file with #%% cell separators #24041

@sergei3000

Description

@sergei3000

Does this issue occur when all extensions are disabled?: Yes/No
It's not possible to use this functionality without the MS Jupyter extension. And only the Insiders version is affected.

  • VS Code Version: Insiders 1.93.0-insider (Universal)
  • OS Version: MacOS Sonoma 14.5 (23F79)

Steps to Reproduce:

  1. Install VS Code Insiders
  2. Install Python and Jupyter extensions by Microsoft (the release ones)
  3. Create a .py file with cell separators like # %% and some code inside a cell
  4. Step into the cell
  5. Try to run the cell with shift+Enter like in the regular non-insiders version
  6. Instead of the "Interactive" window with the set environment (I use conda, install ipykernel into my env), like it works in the regular non-inseder version of vscode, it opens a "Python REPL" window and runs the current line instead of the entire cell. And the environment is something different, I can see it from the fact that it errors out on the line import pandas as pd with ModuleNotFoundError: No module named 'pandas' although pandas is installed in the projects environment.

P.S. The keyboard shortcuts seem to be the same for shift+Enter when I look at them and compare in the regular vscode and in the insiders version.

Metadata

Metadata

Labels

area-replbugIssue 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