Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline variable shown on commented out line #241938

Closed
chrisdias opened this issue Feb 25, 2025 · 1 comment · Fixed by #242005
Closed

Inline variable shown on commented out line #241938

chrisdias opened this issue Feb 25, 2025 · 1 comment · Fixed by #242005
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook-execution Issues related to running cells in a notebook verified Verification succeeded
Milestone

Comments

@chrisdias
Copy link
Member

Testing #241791

Per this comment in the TPI: "The fallback has now been improved to only show the last occurrences of a value, in order to reduce visual clutter and incorrect values."

The value for the array numbers is shown only on the last line of the cell (line 12), even though that line of code is commented out. I would expect the value for numbers to be shown then on the line that was executed (line 10):

Image

Here's the code for the cell:

# Create and manipulate lists
numbers = [1, 2, 3, 4, 5]
fruits = ["apple", "banana", "orange"]

# List operations
numbers.append(6)
fruits.insert(1, "grape")

# List slicing
print(f"First three numbers: {numbers[:3]}")
print(f"Last two fruits: {fruits[-2:]}")
# print(f"Reversed numbers: {numbers[::-1]}")
@Yoyokrazy Yoyokrazy added bug Issue identified by VS Code Team member as probable bug notebook-execution Issues related to running cells in a notebook labels Feb 25, 2025
@Yoyokrazy
Copy link
Contributor

Good catch, looks like a missed filter on commented lines.

@vs-code-engineering vs-code-engineering bot added the unreleased Patch has not yet been released in VS Code Insiders label Feb 26, 2025
@vs-code-engineering vs-code-engineering bot added this to the February 2025 milestone Feb 26, 2025
@vs-code-engineering vs-code-engineering bot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Feb 27, 2025
@meganrogge meganrogge added the verified Verification succeeded label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook-execution Issues related to running cells in a notebook verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants