Skip to content
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

Fix clear-screen timing when showing context #1026

Merged
merged 1 commit into from Dec 21, 2023

Conversation

r12f
Copy link
Contributor

@r12f r12f commented Dec 20, 2023

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.

Clear the screen before showing the context sections when breaking:
gef➤ gef config context.clear_screen 1

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:
image

This change moves the clear screen to the time before showing the context, hence fixing the problem.

Here is the screenshot after the fix:
image

  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Grazfather Grazfather merged commit f0d2818 into hugsy:main Dec 21, 2023
5 of 6 checks passed
@r12f r12f deleted the user/r12f/clear-screen branch December 21, 2023 02:15
@hugsy hugsy added this to the 2024.01 milestone Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants