Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: LonelyTrail on August 13, 2015, 06:03:24 pm

Title: debug perspective - keep cursor/caret centered vertically - or scroll offset
Post by: LonelyTrail on August 13, 2015, 06:03:24 pm
Request:
When I am in a debugging session, stepping through my code, the cursor naturally walks its way down the screen with each "step", until it reaches the bottom of the screen. For each subsequent step lines below the cursor are off the screen and I can't tell what's getting ready to happen, so I manually scroll the text to bring the cursor back up so I can see the next few lines of code.

Is it possible to configure a setting to add buffer space (vim calls this "scroll offset") such that the cursor never reaches the bottom/last line on the screen? This would be a setting where the cursor would always remain above the bottom few(configurable) lines.

This could be for all editor perspectives or, my preference, if in a debug session, most debuggers keep the cursor centered on the screen so that any "continue", "run", or "step into" actions result in the cursor being centered and in an expected location on the screen after the program execution has reached the stopping point/break.
Title: Re: debug perspective - keep cursor/caret centered vertically - or scroll offset
Post by: oBFusCATed on August 13, 2015, 09:07:12 pm
What version of CB are you using?

My tests show that this is working as expected.
If I'm stepping through a function and the cursor goes to a line that is not visible, then the debugger plugin does make it visible again.
Probably we might improve the behaviour a bit, because the line that is made visible is always the last visible line, so the user cannot see what is following it.
Title: Re: debug perspective - keep cursor/caret centered vertically - or scroll offset
Post by: LonelyTrail on August 20, 2015, 06:00:11 pm
v 13.12
But you echo'd exactly what I described. Yes, the line is visible, but it's the last possible line at the bottom of the screen.
Please consider updating that behavior.