I have a list contains several hundred entries. I think the total size of the list is 3.5 MB.
When debugging an issue I can't seem to view any entry passed 300 and I see this message 'Too large to show contents. Max items to show: 300'
Any ideas?
If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on the editor and select Debug Python File in Terminal.
Python in Visual Studio supports debugging without a project. With a stand-alone Python file open, right-click in the editor, select Start with Debugging, and Visual Studio launches the script with the global default environment (see Python environments) and no arguments.
You want to find a file named pydevd_resolver.py
under your Visual Studio Code workspace directory
(you can find it with Bash this command: find / -name pydevd_resolver.py 2>/dev/null
).
Open the file, and inside it look for a constant definition: MAX_ITEMS_TO_HANDLE = 300
. You can change this number to whatever you like, but please note this will of course consume more resources, so be careful with this.
Just for the sake of completion, I paste the note provided above this definition in pydevd_resolver.py
itself:
Note: 300 is already a lot to see in the outline (after that the user should really use the shell to get things) and this also means we'll pass less information to the client side (which makes debugging faster).
For the windows!
You can edit that file, pydevd_resolver.py
, at:
USER_NAME\.vscode\extensions\ms-python.python-2021.3.680753044\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle
It works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With