Author Topic: debug perspective - keep cursor/caret centered vertically - or scroll offset  (Read 2524 times)

Offline LonelyTrail

  • Single posting newcomer
  • *
  • Posts: 2
Request:
  • setting to keep cursor centered during debug session OR
  • setting to keep buffer space (# of lines) between cursor and bottom of screen. Aka: vim scroll offset
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LonelyTrail

  • Single posting newcomer
  • *
  • Posts: 2
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.