Fix clear-screen timing when showing context #1026
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The change is to fix the timing of clearing the screen for showing debugging context.
According to doc, when enabled, before showing the debugging context, screen will be cleaned.
This is helpful to keep the debug experience focused, but the timing seems to be broken with the current code.
Currently, clearing screen will happen after all contexts are shown. Hence, whenever a breakpoint is hit, all contexts will be off the screen leaving only the input prompt as screenshot shows below.
The screenshot here shows the screen output after a breakpoint it hit:
This change moves the clear screen to the time before showing the context, hence fixing the problem.
Here is the screenshot after the fix: