Tye McQueen writes: > Requesting a break point on a subroutine can actually set a break > point on a different subroutine. It appears that the debugger > assumes that the first executable line of a subroutine will be > the line that is executed first, but this isn't always the case: > > sub problem { > $SIG{__DIE__}= sub { > die "<b problem> will set a break point here.\n"; > }; # The break point _should_ be set here. > warn "This line will run even if you enter <c problem>.\n"; > } > &problem; > > Perhaps the debugger can skip the first executable lines if they > belong to a different subroutine? Or perhaps the parse tree gives > a clue to the execution order? Or perhaps the parser can insert a > no-op node at the start of subs compiled for the debugger? There are many other related problems. My solution would be to put breaks on *all* the OP_DBSTATEs (sp?) which appear on a given line. Currently the break is put on the *last* DBSTATE. This will need to keep a linked list of DBSTATEs per line number, instead of one stored DBSTATE per line number which we have now. Any takers? IlyaThread Previous