Breakpoints failing without an error
The problem
You can't set a breakpoint in Perl unless the file has been loaded by the debugger. If you're code dynamically loads libraries, and you try to set a breakpoint in a library that hasn't been loaded yet, VimDebug.vim makes it appear that you successfully set the breakpoint. However, when you do a 'continue', the debugger will not stop at the breakpoint.
The fix
A fix for this would mean an error is displayed and VimDebug.vim should not show that a breakpoint was set (no >> in the margin).
Priority
I suppose there isn't tons of code out there that loads libraries dynamically but Catalyst is an important use case where that does happen.
Larger issues
Not being able to set breakpoints for libraries that haven't yet loaded is also a problem more generally for VimDebug usability. We may have to depend on users editing their code and inserting this line of code: $DB::single=1; This causes the Perl Debugger to enter "single step mode" when this command is encountered and it has no effect when Perl is run without the -d flag.
I suppose one solution to this may be to have the
For Perl at least, maybe the implementaion can directly manipulate the %{'_<'.$filename} hash? (see perl5db.pl)
It seems the debugger doesn't let us modify the hashes for files other than the file thats currently being stepped through. Maybe long term we have to contribute patches to perl5db.pl.
Meh. That may prove to be painful :-(
This command will set a breakpoint on the first line of a subroutine that hasn't yet been loaded.
b postpone subroutine 1
Thats pretty awesome. But I don't know a good way to detect the name of the current sub from vim.
Actually from reading perl5db.pl docs the perl debugger has some pretty awesome features.
It might be possible to use b load <filename> and add defined breakpoints after the file loaded.
I realise that it doesn't sound very nice. But it might do the trick.