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

Scroll settings are not honored in Native Notebook #4406

Closed
XiaomoWu opened this issue Jan 15, 2021 · 14 comments
Closed

Scroll settings are not honored in Native Notebook #4406

XiaomoWu opened this issue Jan 15, 2021 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output on-testplan upstream-vscode Blocked on upstream VS code

Comments

@XiaomoWu
Copy link

Environment data

  • VS Code version: 1.53-insider
  • Jupyter Extension version (available under the Extensions sidebar): 2020.12.414227025
  • Python Extension version (available under the Extensions sidebar): 2020.12.424452561
  • OS (Windows | Mac | Linux distro) and version: Ubuntu 20.10
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): NA
  • Jupyter server running: Local

Expected behaviour

The cell output will automatically scroll if the output is too long.

Actual behaviour

Cell output never scrolls even if I set:

  • "jupyter.enableScrollingForCellOutputs": true
  • "jupyter.maxOutputSize": 200

Steps to reproduce:

for i in range(10000):
    print(i)

scroll
]

@XiaomoWu XiaomoWu added the bug Issue identified by VS Code Team member as probable bug label Jan 15, 2021
@kjohnsen
Copy link

This is a problem for long lines too: without line wrapping and not being able to scroll sideways, I can't see the whole output.

@XiaomoWu XiaomoWu changed the title Can't scroll cell output in native editor. Can't scroll cell output in Native Notebook Jan 15, 2021
@pbotros
Copy link

pbotros commented Jan 18, 2021

+1. Unless I'm mistaken, I think a previous version, circa ~December 2020, had functional line wrapping and scrolling, so there might've been a regression at some point.

@IanMatthewHuff IanMatthewHuff self-assigned this Jan 19, 2021
@IanMatthewHuff
Copy link
Member

Currently in VSCode insiders we are moving over to using a new notebook interface provided by VS Code, instead of the old webview interface that we previously used (and still use in stable). There is indeed a bit of a regression here, and those old jupyter vscode settings will no longer apply to the new interface.

We'll discuss in triage, but this might be moved over to the vscode team to fix as they now own scrolling and sizing of output.

@greazer
Copy link
Member

greazer commented Jan 27, 2021

@XiaomoWu, @pbotros (or anyone else seeing this issue): the latest VS Code insider build automatically truncates long output and provides a link to see all data in a text editor. In the example it looks like this toward the end of the cell output:

image

The default behavior does this for cell output longer than 500 lines. I assume that is too much for your needs? Would adding the maxOutputSize setting to the new notebook interface be sufficient or is the automatic scrolling needed?

Note that the problem of not being able to scroll horizontally is being tracked as a separate VS Code bug: microsoft/vscode#115169

@greazer greazer added the info-needed Issue requires more information from poster label Jan 27, 2021
@greazer greazer changed the title Can't scroll cell output in Native Notebook Scroll settings are not honored in Native Notebook Jan 27, 2021
@XiaomoWu
Copy link
Author

XiaomoWu commented Jan 27, 2021

Hi @greazer I'm so happy to see the virtual scrolling is back to the Native Editor! Yes 500 lines seem a bit too long, I would expect a more JupyterLab like behavior, like 20 lines or so.

Automatic scrolling with a configurable max lines parameter would definitely be appreciated. It's especially handy when I have long, continuing output, like doing deep nets training. But manually turn on/off for each cell would also be okay for me at the moment.

Thank you for all the hard work that makes VS Code awesome!

@rchiodo rchiodo removed the info-needed Issue requires more information from poster label Feb 18, 2021
@DonJayamanne
Copy link
Contributor

Upstream issue microsoft/vscode#118117

@DonJayamanne DonJayamanne added blocked upstream-vscode Blocked on upstream VS code and removed blocked labels Mar 15, 2021
@IanMatthewHuff IanMatthewHuff removed their assignment Apr 22, 2021
@greazer greazer added this to the August 2021 Release milestone Jun 5, 2021
@greazer greazer added the notebook-workflow Issues that interrupt expected or desirable behavior label Aug 5, 2021
@greazer greazer modified the milestones: August 2021, old August 2021 Aug 9, 2021
@dynamicwebpaige dynamicwebpaige mentioned this issue Nov 7, 2021
5 tasks
@GF-Huang
Copy link

@XiaomoWu, @pbotros (or anyone else seeing this issue): the latest VS Code insider build automatically truncates long output and provides a link to see all data in a text editor. In the example it looks like this toward the end of the cell output:

image

The default behavior does this for cell output longer than 500 lines. I assume that is too much for your needs? Would adding the maxOutputSize setting to the new notebook interface be sufficient or is the automatic scrolling needed?

Note that the problem of not being able to scroll horizontally is being tracked as a separate VS Code bug: microsoft/vscode#115169

Can you read this? Open the full output data in a text editor can not render exception stack.

image

image

@felipemello1
Copy link

Hi, any solution for this? There is no scroll bar and when i open the outputs in another window, it is not readable. I cant read error messages to debug my code :/

Thanks in advance for your amazing work with vscode.

@doveppp
Copy link

doveppp commented Sep 22, 2022

@XiaomoWu, @pbotros (or anyone else seeing this issue): the latest VS Code insider build automatically truncates long output and provides a link to see all data in a text editor. In the example it looks like this toward the end of the cell output:
image
The default behavior does this for cell output longer than 500 lines. I assume that is too much for your needs? Would adding the maxOutputSize setting to the new notebook interface be sufficient or is the automatic scrolling needed?
Note that the problem of not being able to scroll horizontally is being tracked as a separate VS Code bug: microsoft/vscode#115169

Can you read this? Open the full output data in a text editor can not render exception stack.

image

image

+1 do you have a good soultion?

@bycn
Copy link

bycn commented Nov 3, 2022

+1 The lack of automatic scroll for large outputs is a big pain point compared to standard jupyter.

@amunger amunger added notebook-output and removed vscode-notebook notebook-workflow Issues that interrupt expected or desirable behavior labels Dec 5, 2022
@bstivers
Copy link

+1 The lack of automatic scroll for large outputs is a big pain point compared to standard jupyter.

I agree. Especially when trying to train larger ML models. Whoever thought of the "open full output in separate txt file (window)" obviously doesn't do any ML work. VSCode's implementation of notebooks is great...for some things...not so great for others...

@r3m0t
Copy link
Contributor

r3m0t commented Feb 23, 2023

@doveppp copying my comment from #10467 about error display-

The workaround is to add this code cell at the start of your notebook

%colors nocolor

This removes the escape codes, like \u001b[0;31m-

If you also want a more compact view of the source code in the traceback, you can add to the same cell

%xmode plain

https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-colors

https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-xmode

@corneliusroemer
Copy link

This issue was chosen as the solution for microsoft/vscode#153839 which in turn was chosen as duplicate of microsoft/vscode#153855 which got quite a lot of thumbs. I've made a StackOverflow question to help gather good workarounds: https://stackoverflow.com/questions/75607544/how-to-display-formatted-jupyter-stack-trace-from-full-output-data/75607634#75607634

@amunger
Copy link
Contributor

amunger commented Mar 29, 2023

notebook.output.scrolling can be used to render outputs in scrollable regions rather than being truncated. It is on be default in vs code insiders and will soon be updated in stable.

Please let us know your feedback!

@amunger amunger closed this as completed Mar 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output on-testplan upstream-vscode Blocked on upstream VS code
Projects
None yet
Development

No branches or pull requests