47

Within Jupyter Notebook in VS Code when I run code that prints a lot of output at some point the remaining output is suppressed and a message is displayed

"show more (open the raw output data in a text editor) ..."

How can I make all the output visible?

enter image description here

6
  • 1
    I think that's internally done and is not possible. stackoverflow.com/questions/36786722/… does this help Commented Jun 6, 2021 at 3:27
  • When you calculate really big numbers in IDLE, it compresses the data and asks user to display full output. I think that's done to prevent IDLE from becoming unresponsive Commented Jun 6, 2021 at 3:29
  • @Sujay, I will check out that link, but at first sight that is not what I am referring to. I mean I explicitly use the "print()" command and such print outs are done multiple times and upon reaching a certain number rows only the last content is shown. Similar to training neutal networks with tensorflow in jupyter, after a certain number Epochs, only the last one is shown. There seems to be a setting to limit the total number rows/pixels that are shown when outputting anything in jupyter... Commented Jun 6, 2021 at 3:31
  • @Sujay, I am happy to "open the raw output data in a text editor" but how can I do that. Clicking on the info message makes VS Code crash Commented Jun 6, 2021 at 3:33
  • 1
    from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all" does this help Commented Jun 6, 2021 at 3:36

4 Answers 4

79

I think you are using the insiders build here is the right setting ,I had the same problem and it worked for me.

"notebook.output.textLineLimit": 500

edit: this will also work for the stable version

Sign up to request clarification or add additional context in comments.

3 Comments

Just to add to this. Open VS Code > File > Preferences > Settings. Then in the settings page look for "notebook". Scroll down and there's the "Notebook > Output: Text Line Limit", which by default has value 50 but can be increased. (VS Code 1.59.0)
I had to add this to my workspace text file like "settings": { "notebook.output.textLineLimit": 500 }
worked for me after restarting vs code
12

You need to change it from the settings. This is set lower value (30 in my case). To see all lines, you need to change the "number of lines to show" value. Follow these steps to do so.

Open VS code settings or (ctrl + ,) >> In search box type "output.textLineLimit" >> Find "Notebook>Output: Text Line Limit" >> Change the value as per your requirement (say 500 to show 500 lines)

Comments

2

In the latest version of VS Code, the above-mentioned options can be found under Features->Notebook->Output: Text Line Limit

Comments

-3

set

"jupyter.textOutputLimit": 0

in the settings.json.

The default value of it is 20000.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.