13

I'm running jupyter notebooks in VSCode and have a return of a very large json - too large to see it all in the jupyter notebook.

When I prettyprint the json in VSCode, it shows some of the data, then: "show more (open the raw output data in a text editor) . . . "

When I click on that, VSCode pops up a msg, "The window is not responding".

How do I make this link work and open that json in Notepad++, which is installed?

Alternatively, how can I dump this json to text file so I can view in a text editor?

1
  • Figured out how to write to file. Is there a way to incorporate the prettyprint formatting in the output that is written to file? import json with open('output.txt', 'w') as output_file: output_file.write(json.dumps(output_data))
    – jub
    Commented Jul 11, 2021 at 0:10

3 Answers 3

17

Once notebooks were natively supported by VSCode, the setting changed to notebook.output.textLineLimit.

1
  • 1
    this doens't work for me Commented Jun 3, 2023 at 2:00
3

You can try to set the 'Max Output Size', which is the setting of the jupyter extension, and check if it works.

If the 'Max Output Size' can't work, use logs or files to keep your output is wise.

2
  • 2
    I set this ("notebook.output.textLineLimit") to 0, which indicates that the output is unlimited. And it worked
    – Klllmmm
    Commented Aug 14, 2022 at 15:39
  • 4
    anyway I cannot find this option in my vscode
    – Vincenzooo
    Commented Jan 11, 2023 at 14:19
1

On VSCode version 1.77.3 is Notebook > Output: Text Line Limit

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.