-
Notifications
You must be signed in to change notification settings - Fork 144
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
Debug console shows too much detail and too little data information #1409
Comments
Debug console is pure disaster with little chance that it will be improved. Or my favorite, if you print pandas dataframe in debug console and click on one row in order to copy cell value out of it. Anyway, good luck. You will need it. |
There are different issues at play here. From the Python debugger perspective, debug console is basically the same logic as Watch. The code that does trimming of values can be seen here: We can apply different limits in cases where the eval is coming from a console, or drop them altogether. But in that case you risk getting in a situation where you try to eval something that would produce a multi-megabyte The 80-column line length for the console is not something that we control or interfere with in debugpy tho. It seems rather that VSCode itself decides to wrap output here for unclear reasons; that should be a separate issue on VSCode itself. |
@int19h Pavel, have you seen debug console in PyCharm. You said: "...you risk getting in a situation where you try to eval something that would produce a multi-megabyte repr()...". It could be a valid argument, but I would rather wait for muli-megabyte repr() but at the same time not struggle with all limitations of debug console. I know that behind the vscode is a big inert organization on which you don't have an influence. Still, I appreciate your willing to help. |
I think this is the kind of trade-off that different people are going to make in different ways. That risk isn't just a theoretical preemptive thing - we had actual bug reports from people who were very confused because their debug session was very slow or outright unresponsive, because one of local variables happened to have an extremely large dataset. So we should come up with a default that handles the most common use cases in a way that is reasonable for most users dealing with those cases - which I think should be a lot more generous than what we have now! - but we should also make it properly configurable so that if you are okay with the caveats of an unlimited repr, you can live dangerously. I'm also mulling the idea of a PEP for some kind of a "pull" |
Have you study how debug console works in PyCharm? |
Hi all. As the images below shows, the debug console shows too much information when you inspect a variable. Up untill recently, it showed all values when you inspected it, together with some general data like the min or max of the array. This is now impossible, as each dropdown menu has another dropdown menu seemingly ad infinitum.
I have tried following microsoft/ptvsd#1621 , but this only hides the special variables and function variables, while all other options remain and the overall data is still not available (image 2). I have tried reinstalling and resetting VSCode (https://stackoverflow.com/questions/36108515/how-to-reset-settings-in-visual-studio-code second comment) , but to no avail. I am not sure what to try anymore.
The text was updated successfully, but these errors were encountered: