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

Console.WriteLine appears to print previous calls to Console.WriteLine #3053

Closed
3 of 17 tasks
istation-ed opened this issue Jun 21, 2023 · 10 comments
Closed
3 of 17 tasks
Labels
bug Something isn't working External

Comments

@istation-ed
Copy link

Describe the bug

Multiple Console.WriteLine calls are repeated as if each subsequent call prints the full stack.

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ): v1.0.4313020

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

If applicable, add screenshots to help explain your problem.
image

@jonsequitur
Copy link
Contributor

I'm not able to reproduce this. Can you provide the complete code that was run leading up to this?

@istation-ed
Copy link
Author

istation-ed commented Jun 22, 2023 via email

@jonsequitur
Copy link
Contributor

GitHub doesn't seem to include the attachment. Is the repro small enough to include the whole notebook in a screen shot?

@istation-ed
Copy link
Author

istation-ed commented Jun 22, 2023 via email

@marckruzik
Copy link
Contributor

marckruzik commented Jun 26, 2023

I have the same problem.
.NET Interactive v1.0.4313020
VS Code v1.79.2

Here is a simple way to reproduce the bug:

2023_06_26-10h26m49s-Window

for(int i=0; i<3; i++)
{
    Console.WriteLine($"line {i}");
}

@istation-ed You can format your code (or output) using the "add code" button in the interface (with the <> icon). Paste your code, select it, and click on the "add code" button. You will see 3 characters looking like a simple quote before and after your code. You can check with the preview tab that everything looks ok.

@jonsequitur
Copy link
Contributor

We still can't repro this. I tried it on a much slower machine where the cell execution took over 6 seconds and that didn't repro it.

Some other questions:

  • Do you have multiple documents open at once?
  • Do you have multiple panes open for the same document?
  • Has the document been saved to disk?
  • If so, which file extension was used?

@istation-ed
Copy link
Author

istation-ed commented Jun 26, 2023 via email

@marckruzik
Copy link
Contributor

marckruzik commented Jun 28, 2023

I installed recently an extension which is causing the bug, this is Data Table Renderers.
https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-table
I uninstalled this extension and the bug disappeared.
(and if I install it again, then the bug comes back, so this extension is really related to the bug)

@colombod
Copy link
Member

colombod commented Jun 28, 2023

interesting, I think that is probably because they register to many input types for rendering, including streams (stdout and stderr).

Would be worth opening the bug on the extension. Thank you very much for finding the root cause.

Will let the extension owner know.

@istation-ed
Copy link
Author

istation-ed commented Jun 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working External
Projects
None yet
Development

No branches or pull requests

4 participants