in reply to Re: Perl Debugger: Is there a variable with the current source line number being traced?
in thread Update: homespun GUI Wrapper for the Perl Debugger with an auto-refreshing editor (BBEdit on Mac OS X) (was: Perl Debugger: Is there a variable with the current source line number being traced?)
I've indeed looked into the debugger (perl5db.pl) where it's reading the caller info (near the beginning of sub DB) and I've patched my script into it right there. I didn't even have to change the $line variable as it's present with that name there already. ;-)
Of course it's still a dirty hack in its current form, but it suits me for the moment: The editor cursor indeed follows the debugger in lockstep, now even without having to insert a pre-prompt command.
Cool! :-)
Especially since the debugger now always points to the code in the editor right where it's ready to get fixed right away, just like a regular IDE. (I still have to switch windows in the editor when tracing into a different file for now, but the application window always remains in the background and updates there while I'm tracing Perl in the Terminal, so that's bearable for the moment.)
At a cursory glance I haven't seen an obvious "official" hook for this purpose in the debugger source yet, so even if my immediate need has now been satisfied, a cleaner way would still be interesting to know if somebody should happen to know one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl Debugger: Is there a variable with the current source line number being traced?
by Anonymous Monk on Feb 25, 2014 at 09:15 UTC | |
by Shoveler (Acolyte) on Feb 25, 2014 at 11:33 UTC |