brummett / Devel-hdb

A graphical Perl debugger implemented as a web service
31 stars 9 forks source link

Go to current line when traversing the stack #56

Closed prat0088 closed 10 years ago

prat0088 commented 10 years ago

When traversing stack frames on the left panel it would be slick if hdb automatically centered the code at the current line, just like "." would do. Right now it's not apparent what the current line is and I always need to click in the code window and then hit "." for every stack frame I click through.

brummett commented 10 years ago

Yeah - it's already supposed to. If I remember right, there's some problem with determining line visibility and scrolling divs that aren't actually being shown. That's why the top-most frame automatically shows the current line (usually), and the others don't.

brummett commented 10 years ago

The fix will go into function _scrollCodeTableLineIntoView() of debugger.js

An activeLine that's part of a non-visible code pane has no position (offset() returns top:0, left:0), and no height() (returns 0).

I'll need to come up with a different way to determine visibility and scroll distance.

brummett commented 10 years ago

Commit 873a412 should fix the problem. Could you give it a try?

brummett commented 10 years ago

I'm pretty sure the named commit fixed the problem then, and the new GUI code seems to work as well.