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

Output truncated with no way to view all output in the notebook itself #7096

Closed
KRiedmiller opened this issue Aug 12, 2021 · 13 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output papercut 🩸 Something affecting the productivity of the team verified Verification succeeded
Milestone

Comments

@KRiedmiller
Copy link

Issue Type: Bug

Since the 1.59 update the output of cells in an interactive python window is truncated if it is longer than 30 lines. The setting 'jupyter.textOutputLimit' is not respected, and I couldn't find another way to change this behaviour.
This is extremly annoying as the 'show more' option only brings up the output unformatted, which isn't usable for long outputs.
I think previously this was solved with a scroll bar which worked perfectly.

Extension version: 2021.8.1105858891
VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:13:20.182Z)
OS version: Linux x64 5.4.0-80-generic
Restricted Mode: No
Remote OS version: Linux x64 5.11.22-100.fc32.x86_64
Remote OS version: Linux x64 5.11.22-100.fc32.x86_64

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlangct:30333562
binariesv615:30325510
vsccppwt:30329788
pythonvssor306:30344512
bridge0708:30335490
pygetstartedc2:30351386
vstre464cf:30350173

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Aug 12, 2021
@greazer greazer added bug Issue identified by VS Code Team member as probable bug regression notebook-output and removed needs-triage labels Aug 12, 2021
@greazer
Copy link
Member

greazer commented Aug 12, 2021

@KRiedmiller thanks for the feedback! While it's being discussed on our end, in the meantime you can work around this a bit by adjusting this setting:

"notebook.output.textLineLimit": 30

Setting to 0 will cause the truncation to be disabled all together.

Also the raw json format of data that is shown in a separate file when clicking on the "show more" link will be fixed in the next release of VS Code.

We understand that your desire is to support just showing more in the same cell output.

@maflAT
Copy link

maflAT commented Aug 15, 2021

The same bug also applies to standard notebooks, not only the interactive window.

@turbonate
Copy link

Just to add a bit here, this truncation causes issues when using help(object) as the help file for almost every major python library is more than 30 lines. It makes the kernel unusable for debugging without the workarounds mentioned in this thread.

Specific commonly used object examples: help(pd.DataFrame) help(sm.OLS)

Thanks!

@greazer greazer changed the title Interactive Output truncated Interactive Output truncated with no way to view all output in the notebook itself Aug 24, 2021
@greazer greazer added the papercut 🩸 Something affecting the productivity of the team label Aug 24, 2021
@greazer greazer added this to the On Deck milestone Oct 25, 2021
@greazer
Copy link
Member

greazer commented Oct 26, 2021

After some internal discussion here, we came to a general agreement that a good thing to try here is to create a custom renderer for stdout that supports viewing output within a scrollable region.

  • Jupyter notebook supports scrollable output by default
  • Jupyter Lab supports non-scrollable output by default (similar to VS Code, without the link)
  • Shift+O should be hooked up to toggle between the two views
  • Jupyter notebook and lab have generous margins on the left and right which can be used as a place to put the mouse to avoid scrolling conflicts.

Pros

  • Output from help commands like help(pd.DataFrame) will be usable from within the notebook and not require being opened in a separate file
  • Users could switch between the scrollable renderer and the non-scrollable to their desire.

Cons

  • Likely that the scrollable output would need to load the entire output, which could be very large and eat up memory.
  • It's not clear that this rendering should be default -- probably not. Based on some research I did, many more people were asking for the ability to see the entirety of an output within the notebook (See Expansion of cell output windows #1673) than the opposite which is the topic of this issue.

Note that the scenario surrounding using the help() mechanism in Python could potentially be alleviated with a separate help window. This has already been entered as an enhancement (just need to find it).

@greazer
Copy link
Member

greazer commented Nov 15, 2021

Highly related issue: #1543. Closing that one as the resolution for this one should address it.

@fschiffers
Copy link

I just wanted to add that setting textLineLimit to as
"notebook.output.textLineLimit": 0
doesn't have the expected effect.

I also tried really high numbers (e.g. 5000), but there still seems to be an internal limit.

I'm using the pytorch lightning advancer profile which spits out a lot of information and I cannot see the information I'd like to see since it truncates at some point.

@amunger
Copy link
Contributor

amunger commented Nov 28, 2022

We have added an experimental setting to enable scrolling on notebook outputs. Turn it on with
"notebook.experimental.outputScrolling": true

@amunger amunger closed this as completed Nov 28, 2022
@andreamah andreamah added the verified Verification succeeded label Dec 1, 2022
@andreamah
Copy link

I can't find the setting notebook.experimental.outputScrolling.

image

Was the new setting registered correctly?

@andreamah andreamah reopened this Dec 1, 2022
@andreamah andreamah added verification-found Issue verification failed and removed verified Verification succeeded labels Dec 1, 2022
@amunger
Copy link
Contributor

amunger commented Dec 1, 2022

It's just an experiment at this point, so it won't appear in the settings UI, it must be manually set in the json.

@andreamah andreamah added verified Verification succeeded and removed verification-found Issue verification failed labels Dec 1, 2022
@underwoodnoble
Copy link

It doesn't work.
1669984095529

@gjsjohnmurray
Copy link
Contributor

@underwoodnoble the "Unknown Configuration Setting" message is just a warning. You can still save it. Does it have the desired effect? If not I suggest you try again after a VS Code reload/restart.

@OyLingji
Copy link

The scrollbar seems not work for the error messages. (v2023.2.1000481019)

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 papercut 🩸 Something affecting the productivity of the team verified Verification succeeded
Projects
None yet
Development

No branches or pull requests