farre / midas

A GDB/MI Visual Studio Code Debug Adapter
MIT License
29 stars 1 forks source link

"Step Back" should step over instead of into #184

Closed sj-raima closed 8 months ago

sj-raima commented 8 months ago

The icon used for "Step Back" indicates that the intention is to "Step Back Over" similar to "Step Over" and not the current behavior which is "Step Back Into".

Stepping back over some statements are more useful and usually what we want. However, both should be supported.

See also issue #183

theIDinside commented 8 months ago

Thank you for reporting this issue. I will address this immediately. Apparently, VSCode is not sending us the "granularity" parameter as per the DAP spec, which makes stepBack default to "step into" (or statement; which unfortunately GDB doesn't understand and I tried getting a patch into gdb that made it understand statements, but it is unfortunately in mailing list hell, trying to explain it to them why it was useful).

But I think we want, like you say, stepBack to default to reverse-next, not reverse-step-in. But this introduces the problem of not being able to reverse-step-in, so I will add another button for this, but that will be in a future release and instead just change the default first.

sj-raima commented 8 months ago

Thank you for a quick fix. I agree, reverse-step-in can be added trough a separate button in a later release.