debugging multi-file scripts using perldb

G

Gaurav Shah

I'm using perldb to debug scripts that call functions from many
different files, which are included with the "require" command.

How do I set a breakpoint in a function, or at a line, that is found
in a file other than the main one?

Thanks in advance,

-Gaurav Shah.
 
P

Peter Scott

I'm using perldb to debug scripts that call functions from many
different files, which are included with the "require" command.

How do I set a breakpoint in a function, or at a line, that is found
in a file other than the main one?

If the function has already been compiled, 'b funcname' will do it.
Of course, it may be in another package and hence 'b somepack::funcname'.

To switch to another source file to use its line numbers, use the
'f' command.

If the function hasn't been compiled yet, you can use
'b postpone funcname' to set a breakpoint on it when it is eventually
loaded.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top