I’m stepping through someone else’s code to find what’s breaking mine under a certain, untestable (don’t ask me why the test framework gives different results from live use, that’s what I’m trying to figure out) circumstance. Each time I’m getting a little further into the code before I crash, is there any way I can set the breakpoint without modifying the source code? so I don’t have to next, step, next, next, next, each time? or modify the source each time. Also take into consideration that I have to step through multiple files, as these programs make extensive use of libraries, and the bug itself appears to be within one of those libraries. So e.g. I know I need to continue executing until I hit line number of file. Also the libraries are loading libraries, I was at least 3-5 libraries deep the last I checked.
note: I’m new to debuggers in general
It sounds like you want the
bcommand in the interactive Perl debugger, which can be used to set future breakpoints. Or maybe theccommand, which works like GDB’suntilif given an argument.You can also automatically set certain breakpoints every time you start the debugger with
afterinitin.perldb. Or use theRcommand which restarts the debugger (and the program being debugged) while keeping breakpoints and other information.