Change:
Splitting from Clone mock-debug Run the tests Resize the window so the debug console has lots of wrapping Run the tests again After a few tests run, the Debug Console will stop scrolling down automatically and just remain part-way through. <img width="838" alt="Screenshot 2021-02-25 at 12 08 28" src="https://user-"
thanks for steps I can reproduce this. here I am hitting the limitation of what the tree gives me. Currently I use the following heurisitc to figure out if the last element is visible in the tree However that does not give the correct result when elements are wrapped and take additional lines. So I could either somehow update that check, or I could use the . I would just care if there are elements after the last visible element, but I could not figure out any tree api to get next neighbour of the last visible element. Might I be missing something? Let me know what you think, thanks.
What 3 values does it return in that case?
In this step we are good: In the next step we are no longer good:
and me investigated into this and it seems to be related to how async code is handled on the list side. Thus assigning this to on-deck and once finds time he can look into a fix or recommend a workaround for me on the Debug Console side.
Any progress on this issue? Would be great to not have to manually scroll down during the debug session.
Not to my knowledge. I've been told a small trick though In the debug console, hit Shift+Tab to move focus from the input box to the output list. Now you can just hit End once to move to the end of the list.
thanks for the tip, but going through all that hassle every single time I type in a command in the debug console or try to inspect a variable by printing out its type is simply not worth it. are there any viable workarounds to this? I believe it makes the debug console pretty much impossible to use for the average python developer.
Workaround is As for progress, we plan to fix this however not sure when. did an initial investigation and it proved more complex than anticipated.
Thanks for your valuable feedback. This works for me. I should probably add that should be to the and not the Just out of curiosity, doesn't that basically solve the problem? What else is there to fix?
Setting wordWrap to false will not display all output. The line before print(True) is only partially visible. !
Setting to false also hide the last line (image). It happens when an exception is thrown (e.g., ) Please fix this! !
any update?
That () was a super annoying bug, but today i found this thread and turned off (turned on by default) and it scrolls down automatically!
Please god if you exists, please re-create the universe except this terrible bug. The bug makes us sad every minutes in Flutter-based development...
I want to have auto-scroll with word wrap functionality. This is very annoying bug.
Maybe this got worse recently, but I am seeing it happen with no wrapping involved, just the simplest single-line output. I think I have a fix. Basically add an item, call updateChildren list renders the item off screen. getHeight returns an estimate that is off by 1px dynamic height is not probed because it is offscreen in tries to scroll to the bottom, but using a scrollHeight measurement that is off by 1px item is rendered, dynamic height is probed, size is fixed, but that means the list is no longer scrolled all the way down, so stops autoscrolling I have an easy workaround to watch for content height change events from the list and update the scroll at this point. I think only Debug Console needs this feature - if it's ever needed anywhere else, we should implement it inside the List.
The issue still occurs. I have to manually scroll down to see the newest logs.
Yep, me too. I've turned off wordWrap and smartScrollin my and I still have to scroll down in the interactive console whenever I run code :( - specifcally, when I run code from the interactive console 'Type python code here and press Enter to run' line, as opposed to when I use a keyboard shortcut to send a selection of code to the interactive console (that seems to scroll okay, unless it is a long output - then it doesn't scroll either way). Print(5) for me, run directly from the interactive console, doesn't auto-scroll enough to see the output, even with these settings here:
can you share a code snippet that reproduces the issue? I don't see an issue. it sounds like you might be using the interactive window which is not what this issue is about. If so, that is
I'm debugging Flutter apps with option which sometimes outputs a lot of lines of logs at once. I suspect that breaks it. When the log density is normal, it works.
How can the fix be tested? Do we need to build from source or is it in the Insiders version?
It went out in the latest stable update. If you're still seeing the issue I can reopen it and investigate a little more
I set up a flutter app and tried debugging it in verbose mode, but it doesn't do anything unusual and I don't see an issue. Also tried some other cases with different types of log messages printed very quickly. are you able to share the app? Or if not, a screen recording of the console, or screenshot of the point where it stops scrolling might help
So, basically wrapped lines considered as single line, therefore it miscalculating how many lines to scroll by?
I'm not seeing an issue with wrapped lines anymore
I'm not sure this is particularly helpful information (besides maybe helping confirm there's still an issue), but I was just able to reproduce this with a Flutter project (on current stable), but have been unable to repro again while recording. It happened while Flutter was doing checks (it prints a lot of very verbose output with all the HTTP requests to the Pub API). I've tried clearing my Pub cache and modifying my pubspec (with so Flutter would re-check Pub packages when the debug session starts), but have been unable to trigger it again (nor could I repro with the original steps using mock-debug above).
Oh, perhaps noteworthy, when it did happen (sorry I didn't take screenshot, I thought it would be easy to repro!), the last few lines printed were a very long line (a large JSON payload) followed by 1 or 2 short (unwrapped) lines.
Issue is still happening. I can't find a good pattern to suspect and reproduce it. All I remember is I had disabled the content wrap setting to give it a shot on my wide screen. Reverting it later did not help. I was doing Flutter development on VSCode for 3 years, and from that day, I'm getting this very annoying bug.
Can you share the project, or the exact log text that causes it so I can try to reproduce it?
I have a fix which I think only affects the case when wordwrap is disabled. From this thread, I'm not sure whether anyone was still seeing an issue with wordwrap enabled. It got a lot easier to repro after my fix for fixed an issue with sizing.
Here's the code I was using to repro the issue: and
I can't repro now, but I saw this again a few days ago, but I do not have wordWrap set, it's on the default (). If I see it again, is there any useful info I can get from it (other than a shareable repro ofc, assuming I can't make one).

Discussion:
this._register(this.tree.onDidChangeContentHeight(() => { if (this.tree.scrollHeight !== this.previousTreeScrollHeight) { <del> const lastElementWasVisible = this.tree.scrollTop + this.tree.renderHeight >= this.previousTreeScrollHeight; </del> <ins> // Due to rounding, the scrollTop + renderHeight will not exactly match the scrollHeight. // Consider the tree to be scrolled all the way down if it is within 2px of the bottom. const lastElementWasVisible = this.tree.scrollTop + this.tree.renderHeight >= this.previousTreeScrollHeight - 2; </ins> if (lastElementWasVisible) { setTimeout(() => { // Can't set scrollTop during this event listener, the list might overwrite the change